Apache hosting problems
I have pointed a site, khanglory.com to ns1-4.linode.com. (I do not have an umbrella domain I want to use for my linode, so Im just sticking with my lixxx.members.linode.com.) Apache is installed and working, if i go to
1) I add khanglory.com to as a master under the DNS Manager in Linode Manager. http://img32.imageshack.us/img32/8387/screenshotgn.png
2) I will have my sites under the created directory /var/www/vhosts/. I add a folder /var/www/vhosts/khanglory.com
I add a folder /var/www/vhosts/khanglory.com/public_html
I add a folder /var/www/vhosts/khanglory.com/logs
I make a Hello World index.html file in public_html
I chmod -R 755 /var/www/vhosts/khanglory.com
3) I create /etc/apache2/sites-available/khanglory.com
<virtualhost *:80=""># Admin email, Server Name (domain name) and any aliases
ServerAdmin kublai@khanglory.com
ServerName khanglory.com
ServerAlias www.khanglory.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /var/www/vhosts/khanglory.com/public_html/
# Custom log file locations
LogLevel warn
ErrorLog /var/www/vhosts/khanglory.com/log/error.log
CustomLog /var/www/vhosts/khanglory.com/log/access.log combined</virtualhost>
4) I verify the following at the bottom of my /etc/apache2/apache2.conf:
# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
NameVirtualHost *:80
5) I then run the commands
a2ensite khanglory.com
/etc/init.d/apache2 reload
(/etc/init.d/apache2 restart)
reload's ok, restart [fail] ..
/etc/init.d/apache2 restart
- Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sun Jan 31 00:20:58 2010] [warn] NameVirtualHost 72.14.189.84:0 has no VirtualHosts apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName [Sun Jan 31 00:20:58 2010] [warn] NameVirtualHost 72.14.189.84:0 has no VirtualHosts
Please let me know if you have any tips, I very much appreciate your time.
Bung
4 Replies
The "fully qualified domain name" message is generated because you don't have anything in /etc/hostname (if in doubt, just copy your default rDNS record into it, e.g. li00-000.members.linode.com)
On the other hand, neither of these should really cause Apache to fail. The problem probably lies elsewhere, so check the last few lines of /var/log/apache2/error.log
I had in fact not created the necessary logs folder. Once I did, I was greated with a Forbidden Access! message. This required adding the following to my /etc/apache2/sites-available/khanglory.com file:
<directory var="" www="" vhosts="" khanglory.com="" public_html="">Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all</directory>
Ive removed the one line from /etc/apache2/apache2.conf, and added my xxx.member.linode to /etc/hostname, but I still get:
# /etc/init.d/apache2 restart
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sun Jan 31 01:56:23 2010] [warn] NameVirtualHost 72.14.189.84:0 has no VirtualHosts
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sun Jan 31 01:56:24 2010] [warn] NameVirtualHost 72.14.189.84:0 has no VirtualHosts
my.li.no.de.ip. lixxx.members.linode.com myservername
And removing the NameVirtualHost line from /etc/apache2/sites-available/khanglory.com makes the other error disappear, w00t!