0
I have been following this tutorial for setting up my htaccess file. Mainly for SSL reasons and error document reasons
- First issue is this apache2 location:
sudo nano /etc/apache2/sites-available/default
When I use the above filepath it takes me to an empty file. However I figured that it is referring to my Apache2 config file, which is:
/etc/apache2/apache2.conf
Correct me if I'm wrong though.
- Secondly, within this file, the tutorial (and many other tutorials) are pointing me a directory. Once the directory is edited, it should look like this:
<Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
However, my directory is not like this. This is mine:
<Directory /var/www/SalesChecker>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
When I try to edit my own directory in any way, it seems to break the apache server and then I am unable to view any of my files from a browser. Also, why is my directory so dissimilar to the example's?
My .htaccess file has an error 404 ready to go, but when a user enters an incorrect URL on my server, my error page is ignored (which isn't surprising considering I know that Apache isn't overriding All)
Does anyone have any suggestions or ideas? Is my logic correct here? Am I looking in the wrong Apache folder? Or why when I try to edit my directory it breaks the website?
My .htaccess file is in my main website folder.
I'm a newbie to Apache and Linux work in general so any suggestions at all that would improve my knowledge would be appreciated.
Thanks!