Opened 4 years ago

Closed 3 years ago

#6 closed defect (worksforme)

nginx.conf does not work

Reported by: truongap.ars@… Owned by:
Priority: critical Component:
Version: Keywords:
Cc: Project: adblock2privoxy

Description

This is my nginx.conf

#user html;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        location ~ ^/[^/.]+\..+/ab2p.css$ {
            root /var/www/privoxy;
            rewrite ^/([^/]*?)\.([^/.]+)(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?(?:\.([^/.]+))?/ab2p.css$ /$9/$8/$7/$6/$5/$4/$3/$2/$1/ab2p.css last;
        }

        location ~ (^.*/+)[^/]+/+ab2p.css {
            root /var/www/privoxy;
            try_files $uri $1ab2p.css;
        }
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}

And this is my systemd log file of nginx

● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
   Active: active (running) since Thu 2014-08-28 21:08:44 ICT; 23s ago
  Process: 3119 ExecStart=/usr/bin/nginx -g pid /run/nginx.pid; error_log stderr; (code=exited, status=0/SUCCESS)
 Main PID: 3120 (nginx)
   CGroup: /system.slice/nginx.service
           ├─3120 nginx: master process /usr/bin/nginx -g pid /run/nginx.pid; error_log stderr
           └─3121 nginx: worker process                                  

Aug 28 21:08:44 manjaro systemd[1]: PID file /run/nginx.pid not readable (yet?) after start.
Aug 28 21:08:44 manjaro systemd[1]: Started A high performance web server and a reverse proxy server.
Aug 28 21:08:50 manjaro nginx[3119]: 2014/08/28 21:08:50 [error] 3121#0: *1 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://manjaro.org/ HTTP/1.1", host: "manjaro.org"
Aug 28 21:08:56 manjaro nginx[3119]: 2014/08/28 21:08:56 [error] 3121#0: *1 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://dantri.com/ HTTP/1.1", host: "dantri.com"
Aug 28 21:08:56 manjaro nginx[3119]: 2014/08/28 21:08:56 [error] 3121#0: *1 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://dantri.com/favicon.ico HTTP/1.1", host: "dantri.com"
Aug 28 21:08:56 manjaro nginx[3119]: 2014/08/28 21:08:56 [error] 3121#0: *1 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://dantri.com/favicon.ico HTTP/1.1", host: "dantri.com"
Aug 28 21:09:03 manjaro nginx[3119]: 2014/08/28 21:09:03 [error] 3121#0: *1 "/etc/nginx/html/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://twitter.com/ HTTP/1.1", host: "twitter.com"
Aug 28 21:09:03 manjaro nginx[3119]: 2014/08/28 21:09:03 [error] 3121#0: *1 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://twitter.com/favicon.ico HTTP/1.1", host: "twitter.com"
Aug 28 21:09:03 manjaro nginx[3119]: 2014/08/28 21:09:03 [error] 3121#0: *1 open() "/etc/nginx/html/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET http://twitter.com/favicon.ico HTTP/1.1", host: "twitter.com"

Change History (1)

comment:1 Changed 3 years ago by zubr

  • Resolution set to worksforme
  • Status changed from new to closed

I see nothing wrong in the log file. Please check if http://localhost/ab2p.common.css is accessible

Note: See TracTickets for help on using tickets.