skip to Main Content

I have an issue where in my web directory the assets folder (which is restricted to normal http requests) is inaccessible through the actual web server. For example, the assets stored there are purely images these images cannot be loaded onto the web page as the web page is denied access.

Here is my current .htaccess file setup in my assets folder:

order deny,allow

deny from all

allow from 127.0.0.1

Maybe I’m really missing something here, but any help is appreciated.

2

Answers


  1. Chosen as BEST ANSWER

    I figured out the issue immediately as I posted this. I had a mega brain fart but all I needed to do was to disable directory index listing, simply alter this in your /etc/apache2/apache2.conf:

    <Directory /www/...some directory...>
        Options Indexes FollowSymLinks #Change this line here
        AllowOverride None
    </Directory>
    
    
    <Directory /www/...some directory...>
            Options FollowSymLinks
            AllowOverride None
        </Directory>
    

  2. use your local IP, not the 127.0.0.1, you may have one IP that you are using to access your network, add that IP, it might be something like 192.168.1.10

    so use:

    order deny,allow
    
    deny from all
    
    allow from 192.168.1.10
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search