The perfect server with debian8 and nginx

Discussion in 'Installation/Configuration' started by Bradley Hamilton, Jan 2, 2017.

  1. Bradley Hamilton

    Bradley Hamilton New Member

    Good Day,

    Happy New Year Till and all.

    I just set up a site with ispconfig 3 and the above named doc. I have never used nginx in production, only to play around with, and decided that I would have a go at it with a new site.

    It was working from the standpoint that I went into ispc and set up the new domain and could see the default index.html file from a browser. I installed wordpress and renamed the default index.html to index.back and browsed to the site and got an http 500 error. Realizing that I had set up wordpress as root I had forgotten to change the owner to all the files and directories to what they should be so I did that and verified with ls -l that it was web1:client1 and restarted nginx but the error persists.
    the service status for niginx looks like this:

    ~# service nginx status
    ● nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
    Active: active (running) since Mon 2017-01-02 02:29:03 UTC; 8min ago
    Process: 14027 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/ (code=exited, status=0/SUCCESS)
    Process: 14030 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 14029 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Main PID: 14034 (nginx)
    CGroup: /system.slice/nginx.service
    ├─14034 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
    ├─14035 nginx: worker process
    ├─14036 nginx: worker process
    ├─14037 nginx: worker process
    └─14038 nginx: worker process

    Jan 02 02:29:03 systemd[1]: Starting A high performance web server and a reverse proxy server...
    Jan 02 02:29:03 systemd[1]: Failed to read PID from file /run/ Invalid argument
    Jan 02 02:29:03 systemd[1]: Started A high performance web server and a reverse proxy server.
    I get this in the logs:

    stream, client:, server:, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/hhvm/hhvm.web1.sock:", host: ""

    I am thinking that when playing around with nginx in the past I had to re order the way nginx looks for the default file to serve so that it looks for index.php before index.html but I am thinking ispc knows this. Is this a hhvm thing? Another thing I have limited no how of.

    {Upated} I switched php-fpm and still the same issue.

    2017/01/02 10:16:40 [error] 29106#0: *1777 open() "/var/www/" failed (2: No such file or directory), client: xxxxx, server: xxxxxcom, request: "GET /cgi/common.cgi HTTP/1.0", host: "188.xxxxx"

    I am not familiar with nginx but I see two things both calls to common.cgi are not looking in my root www path error no such file.

    Any help with this would be appreciated.
    Kind Regards,
    Last edited: Jan 2, 2017
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you should just delete that website in ispconfig and start over. there are no changes in any config files required, just create a website with PHP enabled, then unpack WordPress in the web dir of that website and chown it to the web user and client group of that site, delete the index.html file, then open the domain name in the browser and follow the instructions of the WordPress installer. To get "nice" URL's, you have to add this in the Nginx directives field of the website:

    location / {
    try_files $uri $uri/ /index.php?$args;
    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;

Share This Page