I have an Apache2 server that is configured to provide a website which is located in different folders as follows:
/var/www/maincontains the homepage fileindex.html/var/www/subcontains another filesub.html
While my website’s homepage is accessible the sub-part is not:
www.mysite.com(==www.mysite.com/index.html) worksẁww.mysite.com/subdoes not workẁww.mysite.com/sub.htmldoes not workẁww.mysite.com/sub/sub.htmldoes not work
The error messages are always requested URL ... was not found on this server
/etc/apache2/sites-available/sub:
<VirtualHost *:80>
ServerName www.mysite.com
DocumentRoot /var/www/sub
<Directory /var/www/sub>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
/etc/apache2/httpd.conf:
<VirtualHost *:80>
DocumentRoot /var/www/main
<Directory /var/www/main>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
What is wrong with my configuration?
Need summat like
Then
http://mysite.com/sub/sub.htmlwill be the sub file.http://mysite.com/index.htmlorhttp://mysite.comshould also work.If a sub-directory is not required you need to look into
ReWrite