Custom hostname and Apache 2.2.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I'm a bit new to this, but here goes. My computer is a MacBook Pro with Mac OS X 10.4.11, I am not using the bundled Apach 1.3 server, it has not been activated prior to this. I installed Apache 2.2.6 (as well as PHP and MySQL...) through MacPorts (DarwinPorts) and it has been working flawlessly. It is when I attempt the following I can't make it work.

I have a fancy prompt in Terminal, which displays "username@hostname>", however, I would like the hostname to be the computer name, i.e. I want it to look like "hans@laptop>", because the current hostname is "host-xx-xxx-xx-xxx" which can clutter up the screen a bit too much for me. Now this I solved by typing...

> sudo hostname laptop

...but after that, I can't seem to start Apache. If I change it back to "host-xx-xxx-xx-xxx", all is well. But I want the short name, so I try again. The error message I get is as follows:

httpd: apr_sockaddr_info_get() failed for laptop
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

This is supposedly merely a warning according to http://wiki.apache.org/httpd/CouldNotDetermineServerName but if I open my browser and go to 127.0.0.1 it can't find the server. Nor can I see it listed if I do a

> ps aux | grep httpd

So it would seem it never started at all. I then tried setting my hostname in httpd.conf to the following and restarting Apache 2, without success:

laptop
127.0.0.1
host-xx-xxx-xx-xxx (my old hostname)
127.0.0.1:80
host-xx-xxx-xx-xxx:80
host-xx-xxx-xx-xxx.serva.net (ISP)

None of them worked, I tried changing the listen directive as well to my IP, but that wouldn't help me either. Is it possible to use a custom hostname and have Apache run simultaneously?

Thanks in advance.

Regards,

Hans



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux