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 trying to serve several thing on Nginx, including ttrss. When trying to access the site, I get the error:

2013/09/25 16:51:06 [error] 15010#0: *30 "/var/www/ttrss/ttrss/index.php" is not found (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: localhost, request: "GET /ttrss/ HTTP/1.1", host: "name.of.the.host"

I've tried to change the root and tried using alias, but can't get it to target the right path. Here is my nginx.conf.

user www-data;
worker_processes 1;
pid /var/run/nginx.pid;

events {
    worker_connections 768;
    # multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    index index.php index.htm index.html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 70;
    types_hash_max_size 2048;
    # server_tokens off;

    server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";

    # gzip_vary on;
    # gzip_proxied any;
    # gzip_comp_level 6;
    # gzip_buffers 16 8k;
    # gzip_http_version 1.1;
    # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # nginx-naxsi config
    ##
    # Uncomment it if you installed nginx-naxsi
    ##

    #include /etc/nginx/naxsi_core.rules;

    ##
    # nginx-passenger config
    ##
    # Uncomment it if you installed nginx-passenger
    ##

    #passenger_root /usr;
    #passenger_ruby /usr/bin/ruby;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

    ##
    # HTTPS server optimization
    ##

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;

}

And here is the conf file from my sites-enabled:

server {
listen 80; ## listen for ipv4; this line is default and implied

server_name server.name;

location /ttrss {

    root /var/www/;
    index index.php;

    # pass the PHP scripts to FastCGI server
    location ~ \.php$ {
        try_files      $uri =404; # security check

                    include        fastcgi_params;
                    fastcgi_pass   unix:/var/run/fcgi.socket;
                    fastcgi_index  index.php;

                    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                    fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;
    }
}

}

Where does the second ttrss on the path come from?

share|improve this question
    
try changing location /ttrss to location / –  Andrei Mikhaltsov Sep 25 '13 at 16:27
    
I don't understand how that would work, but I don't understand the problem anyway, so I tried. Didn't help. –  krax Sep 25 '13 at 16:35

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.