easy resolution.
two things need to correspond, the computers domainname and the domain name configured in http.conf, the main apache configuration file that all the others revolve around.
Add this line to the main apache config file (i put it right at the top, the first uncommented line): ServerName example.com And then issue one command as root from the command line: # domainname example.com As long as these two settings correspond all will be fine, virtual hosting will have no effect on this. I found that doing # hostname example.com worked without having to edit the config file but then u r calling your host the name of your domain which is ok as long as u only have one host in your domain. |
ServerName directive under Apache2 under Ubuntu
It's a wee bit frustrating ... but the implementation of apache2 under ubuntu 6.06 seems to be different than referenced above.
Specifically, httpd.conf is a place holder file only. I looked in /etc/apache2/apache2.conf and a servername directive is nowhere to be found. I am getting a similar message when I restart apache: * Forcing reload of apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName However, my server is working fine. That is, if you go to www.cthia.com ... it correctly points to the default directory and index.html on my computer. The other virtual hosts that I'm running are not showing up, yet. However, that is an error relating to my router and external IP address range, I believe. Any ideas where the problem for this error might lie? Michael |
Error FIXED under apache2 - ubuntu implementation
As described above, I put in
ServerName cthia.com as an uncommented line, in the top of apache2.conf Now, when I force reboot apache2, I get: michael@carolyn-ubuntu:/etc/apache2/sites-available$ sudo /etc/init.d/apache2 restart Password: * Forcing reload of apache 2.0 web server... [ ok ] michael@carolyn-ubuntu:/etc/apache2/sites-available$ So, the solution, as suggested, works fine. This is NOT covered in the Ubuntu Linux Bible, or in The Official Unbuntu Linux book. Michael |
Hi,
last post seems to be correct. I got the same problem with an Apache 2.0.46. I could resolved it with an thread from another forum: http://www.wallpaperama.com/forums/h...-name-t23.html Cheers Sascha |
Quote:
|
I got the same error message in my debian server, but apache2 was able to start despite that.
To make the error message go away, I changed the following values: /etc/hosts 120.0.0.1 localhost $my_IP_address mydomain.com /etc/hostname mydomain.com /proc/sys/kernel/hostname mydomain.com logout, then log back in, and type: apache2ctl restart ------- My favorite websites: Buy and sell class notes, old exams, papers, lab reports, admission essays. Ask and answer Linux questions. Read free books without walking to the library. |
Server Naming on a Mac
How can I tell Apache which httpd.conf file to use?
I have a similar problem. I am trying to set up a Mac Mini at a server farm using colocation hosting and have the FQDN pointing to a name server at the server farm, and their name server provides the IP address of my Mac Mini. It works fine for a single domain name but I want to use several virtual hosts. I set this up initially using OS X Leopard Server but it would not resolve the virtual domains so I gave up and tried to do it directly in BSD Linux. I edited the file /etc/httpd/httpd.conf file and added specs for the ServerName and Virtual Hosts per Apache.org specs. I think you have to restart httpd to activate the conf file. I used Apachectl -k graceful and got httpd: apr_sockaddr_info_get() failed for PhooD.com httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName httpd not running, trying to start (48)Address already in use: make_sock: could not bind to address 127.0.0.1:9010 no listening sockets available, shutting down Unable to open logs I found the server name was set as www-server.PhooD.com I added the server's domain name to the /etc/hosts file (as above) and got rid of the first two lines of this error but the rest remains. top reveals that http is running but it is not recognized by: httpd -k stop httpd (pid 42?) not running |
Does the FQDN used as ServerName have to be different to the Virtual Domain names
Does the FQDN used as ServerName have to be different to the Virtual Domain names?
The first entry in this thread suggests they have to be different. In other words do you have to register a domain name just to give the server a name? |
try to this script, this should work
[me@linux]#echo yourdomain.yourdomain.com> /etc/hostname [me@linux]#/bin/hostname -F /etc/hostname and restart apache. Shutting down httpd: [ OK ] Starting httpd: [ OK ] |
Hey just change the hosts.conf file.
EX- localhost.localdomain localhost put your server name .domain name. |
@sakibsyl: Please don't revive a 6 year old thread. This thread is already a mess as is, with 4 different people asking related question in the same thread over a period of 3 years.
BTW: Welcome to LQ ;) |
|
A working solution
do following 2 changes:
in /etc/hosts <ip_address> <domain_name> and in httpd.conf Servername <domain_name>:80 |
Thanks!
bulliver, you are a god! Got my little problem fixed just by Googling the error output. Thanks!
|
Deleted message
|
All times are GMT -5. The time now is 09:09 PM. |