The new Apache default server location is /var/www/html. You can move all your files to the new directory or you can do the following on a terminal (as root):
# cd /etc/apache2/sites-available
# nano site1
Now, on nano paste the following:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName site1
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
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>
Save the file and run these commands (again as root):
# a2ensite site
# nano /etc/hosts
Now add this on the first line: 127.0.0.1 localhost site1
Save the file and reload Apache with this command (again as root):
# /etc/init.d/apache2 reload
You should get a message telling you site1 is enabled. Now you can safely remove /var/www/html so you don't have an empty directory on your server:
# rm /var/www/html/
Hope it helps, greetings.
Wordpress
, many information are saved inside the related databases. (Info not only of the web pages but even of the plugins). They should use relative path, but not always it is so. If you abruptly move them from a path to another I don't know how they can react after. (I find e.g._wp_attachment_backup_sizes
,recently_edited
,latex_cache_path
keys with absolute paths). – Hastur May 27 '14 at 11:55