solved DirectoryIndex not allowed here

seventh
@seventh
2 months ago
2 posts
I have my own server and created new virtualhost file for apache:

        ServerName tree.site.ru
        ServerAlias www.tree.site.ru
        ServerAdmin dima@site.ru
        DocumentRoot /var/www/tree.site.ru

AssignUserID www-data www-data
php_admin_flag safe_mode on
php_admin_flag safe_mode_gid on
php_admin_value open_basedir /var/www/tree.site.ru:/tmp:/usr/bin/stat:/usr/bin/curl:/usr/share/php:/usr/share/pear:/usr/share/javascript:/usr/share/apache

        
                Options +Indexes -FollowSymLinks -MultiViews -SymLinksIfOwnerMatch
                AllowOverride All
                Order allow,deny
                Allow from all
                Allowoverride FileInfo
        

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

        
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        

        ErrorLog ${APACHE_LOG_DIR}/tree.site_error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/tree.site_access.log combined

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/tree.site.ru/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/tree.site.ru/privkey.pem


I put files in directory /var/www/tree.site.ru and get 500 Internal Server Error. In error.log I see:


 [core:alert] [pid 10699] [client 79.x.x.x:6059] /var/www/tree.site.ru/.htaccess: DirectoryIndex not allowed here, referer: (Offsite URL Removed) 


What I'm doing wrong?
Thank you in advance!
updated by @seventh: 02 Oct 2019 05:44:05AM
brian
@brian
2 months ago
9,922 posts
It sounds like you've not allowed DirectoryIndex to be overridden at the .htaccess level - so you need to add:

DirectoryIndex modules/jrCore/router.php

In your virtual config and then remove that line from the /var/www/tree.site.r/.htaccess file.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
seventh
@seventh
2 months ago
2 posts
Yes, it works!
Same things with Options after it needed to be edited.
Thank you!
brian
@brian
2 months ago
9,922 posts
seventh:
Yes, it works!
Same things with Options after it needed to be edited.
Thank you!

Awesome - glad that worked :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags