Problems with 22222 - need to reinstall nginx config but how?


#1

I had a working setup with :22222 admin tools working great.

Then after trying to upgrade 22222 configuration to php7, the script choked and managed to mess up the 22222 config.

I wanted to start again and deleted the site, plus the webroot for 22222. I removed and purged all the admin tools. Then I reinstalled.

The files are now back in 22222, but there is no nginx configuration.

Can anyone help me to get my 22222 back? All I see in EasyEngine is a moustache file, but have no idea how to run it. Thanks.


#2

So you just need to guts of the 22222.conf file?

# EasyEngine admin NGINX CONFIGURATION

server {

  listen 22222 default_server ssl http2;

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

  ssl_certificate /var/www/22222/cert/22222.crt;
  ssl_certificate_key /var/www/22222/cert/22222.key;

  # Force HTTP to HTTPS
  error_page 497 =200 https://$host:22222$request_uri;

  root /var/www/22222/htdocs;
  index index.php index.htm index.html;

  # Turn on directory listing
  autoindex on;

  # HTTP Authentication on port 22222
  include common/acl.conf;

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

  # Display menu at location /fpm/status/
  location =  /fpm/status/ {}

  location ~ /fpm/status/(.*) {
    try_files $uri =404;
    include fastcgi_params;
    fastcgi_param  SCRIPT_NAME  /status;
    fastcgi_pass $1;
  }

  location ~ \.php$ {
    try_files $uri =404;
    include fastcgi_params;
    fastcgi_pass php;
  }

  # ViMbAdmin Rules
  location = /vimbadmin/ {
    return 301 $scheme://$host:22222/vimbadmin/public/;
  }

  location ~* \.(js|css|jpg|gif|png)$ {
    root /var/www/22222/htdocs/;
  }

  location ~* /vimbadmin/public/(.*)/(.*) {
    root /var/www/22222/htdocs/vimbadmin/public;
    try_files $uri $uri/  /vimbadmin/public/index.php?$args;
  }

  location ~* /vimbadmin/public/(.*) {
    root /var/www/22222/htdocs/vimbadmin/public;
    try_files $uri $uri/  /vimbadmin/public/index.php?$args;
  }

}

#3

Thank you! :slight_smile:


#4

I am having the same problem, the admin tools install, it is not producing an nginx config at all. And get the following error with that config…

nginx: [emerg] invalid parameter “http2” in /etc/nginx/sites-enabled/22222:5 nginx: configuration file /etc/nginx/nginx.conf test failed

EasyEngine v3.7.4 nginx version: nginx/1.8.0

Thanks Sean


#5