Forum Moderators: phranque
my registrar or whatever they're called has said i need to add avirtual host entry to httpd.conf to fix the problem. well ok, but i have no idea what this entry should look like.
ive read about it in the apache guide, name based entries, but it didn't make much sense to me.
First you have to configure your DNS server to point mydomain.tld to your web server.
Then you have to add to httpd.conf something like:
<VirtualHost *:80>
ServerName mydomain.tld
DocumentRoot /path/to/your/httpserver/files
</VirtualHost>
Try to restart apache and point your browser to [mydomain.tld...] and see if it works. Also you can check if DNS is configured correctly by checking name service (try dnstools.com and see if your domain name is configured and is accessable from outside).
Hope this helps,
- paul.
I am using Ubuntu 5.04 as my main desktop with Apache 2 and vhosts for each project. Virtual host support should be enabled already in the default configuration: to add a new one, go to:
/etc/apache2/sites-available/ You should see a
default file. You add a new file for each vhost - my (very basic) setup is simply: <VirtualHost *>
DocumentRoot "/home/example/public_html"
ServerName example.com
</VirtualHost> Save as "example".
To activate the vhost, you need to symlink it from:
/etc/apache2/sites-enabled/ Like this:
ln -s /etc/apache2/sites-available/example /etc/apache2/sites-enabled/example (all as root or with
sudo, obviously) Then just restart Apache for the changes to take effect:
/etc/init.d/apache2 restart Just dig around
/etc/apache2/ and check out the documentation to get a feel of how it all works. One off-topic warning - by default Apache in Ubuntu is set up to send a charset header of UTF-8 for every page, which can cause big problems with sites not encoded in UTF-8.
(88)Address already in use: make_sock: could not bind to address [::]:80 no listening sockets available, shutting down
Despite "shutting down" the apache webserver is still up and running.
Also, I guess you are the reason I couldn't register "steve" :P
Jim