I just setup a LAMP on my Ubuntu 10.0.4 desktop using tasksel with PMA and am working on configuring virtual hosts to more easily browse sites I will be development and or testing on this localhost.I have two problems. Every time I restart Apache or do some work on a virtualhost I get this error:
Code:
$ sudo /etc/init.d/apache2 restart
sudo: unable to resolve host ubuntu
* Restarting web server apache2 apache2: apr_sockaddr_info_get() failed for ubuntu
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
... waiting apache2: apr_sockaddr_info_get() failed for ubuntu
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
I only have a virtualhost default and wordpress. How is this error caused and how can I resolve it?
Second issue, when I go to wordpress-dev my /etc/hosts file neatly directs me to my virtualhost Wordpress residing in /var/www/wordpress, but when I click to see a comment I get a url with localhost in it:
Code:
http://localhost/wordpress/?p=1#comments
. Is this a Wordpress permalinks issue or is this a virtualhost missconfiguration?
Here is my virtualhost wordpress
Code:
<VirtualHost 127.0.1.1:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/wordpress/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/wordpress/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
And here my hosts file:
Code:
127.0.0.1 localhost
127.0.1.1 wordpress-dev
# The followinag lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Bookmarks