Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using nginx 1.0.4 + php-fpm + wordpress on OpenVZ Container. my setup works fine. but when i try access to http://example.com/wp-admin/ it give me 403 error and I access http://example.com/wp-admin/index.php works fine. Error log :

2011/07/24 21:50:38 [error] 29939#0: *35 "/home/example/blog/public_html/wp-admin/index.php" is forbidden (13: Permission denied), client: 125.234.x.x, server: loopback.info, request: "GET /wp-admin/ HTTP/1.1", host: "example.com"

Below is my config:

    upstream example {
            server    unix:/dev/shm/example.sock;

    server {
            listen   80;
            server_name  example.com;
            root /home/example/blog/public_html;
            index index.php;
            access_log  /home/example/blog/logs/access.log;
            error_log /home/example/blog/logs/error.log;

            location ~ /\.ht {
             deny all;
            }
            location = /favicon.ico {
                    log_not_found off;
                    access_log off;
            }

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


            location / {
                    try_files $uri $uri/ /index.php;
            }

            location ~ \.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass  example;
            include        fastcgi_params;
        }

     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }

}
share|improve this question
add comment

2 Answers 2

I know this isn't an answer, but I find it curious why you are using sockets instead of proxy pass to, say 127.0.0.1:9000?

share|improve this answer
    
uninx socket or tcp is same error! –  Mr.Hien Jul 25 '11 at 3:09
2  
@Aco: Because sockets are generally faster than TCP as long as you don't need to proxy to other servers –  pauska Jul 26 '11 at 8:58
    
@pauska Would you by any chance know if I could use sockets for memcached? Thanks for the feedback! :) –  Aco Jul 26 '11 at 22:42
1  
@Aco: Why would you want to use sockets with memcached? The whole point of using memcached is to share cache between servers, wich is not possible without TCP/IP –  pauska Jul 27 '11 at 6:59
    
it's a common fallacy that unix sockets are faster. You can make some benchmarks, but the difference is negligible on my experience –  DukeLion Feb 9 '13 at 7:49
add comment

I solved by remove

 open_file_cache max=5000 inactive=20s;

from main nginx config file.

share|improve this answer
    
Can you accept your answer so people won't spend time resolving your problem. –  lulalala Aug 8 '12 at 4:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.