Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
113 views
by Rookie

Due to some misconfigured nginx and directories, I've lost access to the tools site.

I've already tried sudo webinoly -tools-site=default however, I receive, cp: cannot stat '/var/www/default:22222/*': No such file or directory

Is there an option to reinstate the tools-site to its default state without completely reinstalling webinoly?


webinoly-verify log:

(1) Webinoly Integrity Test successful!

- [ERROR] File: /var/www/default:22222/htdocs/nginx_status not found!

(2) NGINX Verification Test has failed!

- [ERROR] File: /var/www/default:22222/htdocs/ping not found!

- [ERROR] File: /var/www/default:22222/htdocs/status not found!

- [ERROR] File: /var/www/default:22222/htdocs/php/index.php not found!

(3) PHP Verification Test has failed!

(4) MySQL Verification Test successful!

(5) Service Status Verification Test successful!

(6) Operating System Verification Test successful!

- [ERROR] Folder: /var/www/default:22222/htdocs/pma not found!

(7) Additional Tools Verification Test has failed!

(8) Permissions Verification Test successful!

Site example.com is the main site in a WP Multisite Network!

(9) Sites Verification Test successful!

*******************************************************

********      > > >  E R R O R < < <        ***********

********   System could not work properly   ***********

*******************************************************

1 Answer

0 votes
by Expert

Tools site data folder (/var/www) and Nginx configuration (/etc/nginx/sites-available) should be still there, on your server. Just look for it and then you can manually fix it. It's that easy!

by Rookie

Unfortunately, the content inside the tools site data folder (/var/www/example.com:22222) is empty

404 not found when visiting the tools-site (after successful HTTP auth)

by Expert

Any other data folder, like /var/www/22222 or similar?

If not, then there is no safe option to recover these tools. The only way, (not recommended because we don't know which other misconfigurations you have introduced by yourself), but you can reinstall Nginx, remove it using the "keep-data" option and then install it again.

by Rookie

Any other data folder, like /var/www/22222 or similar?

Other WordPress installs are running perfectly. However, it's the "tools-site" that is missing its contents. Just an empty folder as var/www/example.com:22222

Ran stack -nginx=keep-data -purge then sudo stack -nginx yielded a similar result.


Executing: /lib/systemd/systemd-sysv-install enable nginx

Nginx has been installed successfully!

Tools-Site not changed!

Only-Error Log was successfully enabled (global)!

Referrer Policy Header successfully configured!

HSTS Header successfully configured!

Cache Control Header successfully configured!

CSP Header successfully disabled!

Permissions Policy Header successfully disabled!

X-Robots-Tag Header successfully disabled!

X-XSS-Protection Header successfully disabled!

X-Content-Type-Options Header successfully configured!

X-Frame-Options Header successfully configured!

Nginx has been successfully Optimized by Webinoly!

touch: cannot touch '/var/www/example.com:22222/htdocs/nginx_status': No such file or directory

touch: cannot touch '/var/www/example.com:22222/htdocs/robots.txt': No such file or directory

/opt/webinoly/lib/install: line 523: /var/www/example.com:22222/htdocs/robots.txt: No such file or directory

chmod: cannot access '/var/www/example.com:22222/htdocs/robots.txt': No such file or directory

chown: cannot access '/var/www/example.com:22222/htdocs': No such file or directory

touch: cannot touch '/var/www/example.com:22222/htdocs/ping': No such file or directory

touch: cannot touch '/var/www/example.com:22222/htdocs/status': No such file or directory

Verifying integrity of the entire Webinoly system...

- [ERROR] File: /var/www/example.com:22222/htdocs/nginx_status not found!

- [ERROR] File: /var/www/example.com:22222/htdocs/ping not found!

- [ERROR] File: /var/www/example.com:22222/htdocs/status not found!

- [ERROR] Folder: /var/www/example.com:22222/htdocs/pma not found!

*******************************************************

********      > > >  E R R O R < < <        ***********

********   System could not work properly   ***********

*******************************************************

by Expert

Ok. Check if this file exist: /etc/nginx/sites-available/example.com:22222 and remove it. Then repeat the Nginx reinstallation!

by Rookie
edited by

Ok, now it did create this exact specific structure and file: /var/www/example.com:22222/

I can now see the site-tools content now but nginx fails to start.


nginx: [emerg] open() "/etc/nginx/sites-enabled/example.com:22222" failed (2: No such file or directory) in /etc/nginx/nginx.conf:151

nginx: configuration file /etc/nginx/nginx.conf test failed

Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install enable nginx

Nginx has been installed successfully!

Job for nginx.service failed because the control process exited with error code.

See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.

Tools-Site not changed!

nginx.service is not active, cannot reload.

Only-Error Log was successfully enabled (global)!

nginx.service is not active, cannot reload.

Referrer Policy Header successfully configured!

HSTS Header successfully configured!

Cache Control Header successfully configured!

CSP Header successfully disabled!

Permissions Policy Header successfully disabled!

X-Robots-Tag Header successfully disabled!

X-XSS-Protection Header successfully disabled!

X-Content-Type-Options Header successfully configured!

X-Frame-Options Header successfully configured!

nginx.service is not active, cannot reload.

Nginx has been successfully Optimized by Webinoly!

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok

nginx: configuration file /etc/nginx/nginx.conf test is successful

nginx.service is not active, cannot reload.

Verifying integrity of the entire Webinoly system...

- [ERROR] Nginx service not running!

- [ERROR] Folder: /var/www/example.com:22222/htdocs/pma not found!

*******************************************************

********      > > >  E R R O R < < <        ***********

********   System could not work properly   ***********

*******************************************************

by Expert

Ok. Remove: /etc/nginx/sites-available/example.com:22222 

Remove: /etc/nginx/sites-enabled/example.com:22222 

And also, remove this folder: /var/www/example.com:22222

Reinstall Nginx again!

by Expert
Please, don't edit your comments. If only Nginx is failing to start, that's an easy one, I'm sure you can fix it.
by Rookie

Thank you, the tools are now recovered.

Just to document the steps I took for anyone who might stumble on this post.

  1. Remove: /etc/nginx/sites-available/example.com:22222 

  2. Remove/etc/nginx/sites-enabled/example.com:22222

  3. Remove: /var/www/example.com:22222

  4. stack -nginx=keep-data -purge

  5. stack -pma -purge

  6. stack -pma

  7. stack -nginx

by Expert

Just for the record: I will add an option to rebuild the admin area/site, it should be easy and practical (maybe scheduled for v1.18.0).

by Rookie
Thank you for considering this.
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...