My directory structure is var/www/html and my website was installed in the html folder. I created a new directory called myfirstwebsite so now the directory structure is var/www/myfirstwebsite. I am doing this because I am trying to host two different websites using apache virtual host. I updated the httpd.conf to directory root /var/www and added Now the front page of the website loads perfectly fine, but the problem is none of the navigation links work (i get the error: requested url was not found on this server). Anyone have any idea what could be wrong here? I could really use the help.
Apache knows at least two different types of configuration:
If apache is configured the right way, you can have a file called .htaccess which contains a lot of configuration settings. Have a look into magentos to get an impression.
The problem is, every time someone requests a page, apache is reading .htaccess (in case something changed). This is slow, but easy to update!
I think your problem is:
To use an htaccess file, you need to define
The better thing is, to put all the configuration into the vhost configuration. The configuration file is read once, when the httpd(eamon) starts and then any changes are only used, if you restart the server (or at least reload the config).
Have a look into the documentation of apache, to know which is a vhost specific configuration and what needs a entry.
I assume there is some kind of default configuration, but no clue.