Hello. I have a big problem with Apache This is my VirtualHost config <VirtualHost 46.214.131.224:80> DocumentRoot "/home/files/" ServerName files.abcdownload.ro <Directory "/home/files/"> allow from all Options +Indexes </Directory> ScriptAlias /cgi-bin "/home/files/cgi-bin" </VirtualHost> Code (markup): But when i acces files.abcdownload.ro apache reads /var/www/html/ directory instead of /home/files Apache gives my 404 errors on existing files on server because of that. HEre are the error logs: [Sun Jan 29 13:43:47 2012] [error] [client 46.214.131.224] File does not exist: /var/www/html/public_html[Sun Jan 29 13:43:51 2012] [error] [client 46.214.131.224] Directory index forbidden by Options directive: /var/www/html/[Sun Jan 29 13:44:24 2012] [error] [client 46.214.131.224] File does not exist: /var/www/html/roedu-forum.png Code (markup): What to do next?
Check your httpd.conf file if it has a line which starts with "Include" and if there is any file mentioned there .. then please make your entries there
I don`t understand ... what include does to do with this? My VirtualHosts are correctly configured in httpd.conf
Please visit this link for more info about Virtual Hosts. Your directory should be "/home/username/files" but not "/home/files" and you should give permissions to the folder.
^ ^ DocumentRoot is the place where the webfiles are present. Its is not mandatory that directory should be "/home/username/files" if the web files are present in "/home/files" it will work from there as well.
A friend that knows linux very well solved my problem. The problem was NAT from my rooter, I was setting the external IP address in VirtualHosts with was confusing to apache, but when i set my network ip 192.168.1.120 in apache virtualhost (or just use all addresses *:80) its working fine in /home/user DMZ has the same problem, only works if internal IP is set to apache`s VirtualHost.