Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > ISPConfig 3 Priority Support

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 3rd June 2013, 15:43
cafeine65 cafeine65 is offline
Junior Member
Join Date: May 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Nginx / protect directory and Wordpress


I have some problems with nginx and wordpress and protect directory

I have a wordpress site with permalink active :
I have a nginx and in ISP Config web site I add :
try_files $uri $uri/ /index.php?q=$uri&$args;
It's work fine

When I add a protect folder on / (base of my web site), I have a 404 not found

here the code of the vhost
server {
        listen *:80;

        server_name mywebsite.com ;

        root   /var/www/mywebsite.com/web;

        index index.html index.htm index.php index.cgi index.pl index.xhtml;

        error_log /var/log/ispconfig/httpd/mywebsite.com/error.log;
        access_log /var/log/ispconfig/httpd/mywebsite.com/access.log combin$

        ## Disable .htaccess and other hidden files
        location ~ /\. {
            deny all;
            access_log off;
            log_not_found off;

        location = /favicon.ico {
            log_not_found off;
            access_log off;

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;

        location /stats {

            index index.html index.php;
            auth_basic "Members Only";
            auth_basic_user_file /var/www/clients/client1/web1/web/stats/.htpas$

        location ^~ /awstats-icon {
            alias /usr/share/awstats/icon;

        location ~ \.php$ {
            try_files /4e59b599d97e7f99c0a520473a78ad7.htm @php;

        location @php {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            include /etc/nginx/fastcgi_params;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            #fastcgi_param PATH_INFO $fastcgi_script_name;
            fastcgi_intercept_errors on;

        try_files $uri $uri/ /index.php?q=$uri&$args;

        location / {
                auth_basic "Members Only";
                auth_basic_user_file /var/www/clients/client1/web1/web/.htpassw$

                location ~ \.php$ {
                    try_files /4e59b599d97e7f99c0a520473a78ad7.htm @php;


Have you a fix or an idea ?

Thanks in advance
Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Updating and Uploading to Wordpress website on ISPConfig3 - Fedora 13 MrCompTech Tips/Tricks/Mods 8 25th August 2014 15:18
ISPConfig web stats and Wordpress arkkimus Installation/Configuration 1 21st December 2012 09:28
Wordpress Error 500 on ISPConfig3.0.4.3 NGINX tested0002 Installation/Configuration 15 9th November 2012 13:17
Wordpress, not access to /stats/ directory ErikZ Installation/Configuration 11 5th May 2012 00:05
ISPConfig 3.x - First Steps (Creating Web Sites, Email Addresses, Etc.) sighkick Suggest HOWTO 18 7th October 2010 01:12

All times are GMT +2. The time now is 03:56.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.