Are you using Apache Virtual Host ?. Make sure you have a directory where your site will be (usually by convention it is placed in /var/www/tusitioweb
). I suggest you always use the domain name for ease of maintenance (in this example it would be /var/www/milocal.com
). You must give permission to the web server (usually the user is www-data that must have read permissions for all and read and write for www-data, this will allow your PHP scripts to manipulate the information in those directories).
Also make sure you have a virtual hosting file in /etc/apache2/sites-available/milocal.com
(or whatever your domain is).
For this example the file would look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName milocal.com
DocumentRoot /var/www/milocal.com/proyecto
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/milocal.com/proyecto>
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 ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/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>
Finally, do not forget to activate this configuration with:
a2ensite milocal.com
to then restart the apache server with:
service apache2 restart
P.D: Do not forget to address your DNS server to the IP address of your machine.