• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue nginx does not recognize urls

python

Regular Pleskian
Everything worked fine until I modified some directives for nginx from the panel of plesk configure apache and nginx made several changes, I realized repeating that nginx did not recognize the friendly urls that I have configured in an htaccess file.

I do not find errors or maybe I can not see them I'm looking in /var/log/nginx/error.log

Any suggestion of what may be happening, I reiterate the problem is that it does not recognize the friendly url.
regards
 
Python,

First try to establish whether it is really Nginx causing problems.

If you switch off Nginx as a proxy and the problem still persists, then it certainly is not a problem related to Nginx.

So, try that first and, afterwards, put some log outputs on the forum, to allow us to be of some better assistance.

Regards.......
 
when deactivating nginx everything works correctly, as I said I do not find errors but when configuring nginx from plesk tube syntax errors that I later solved although now I do not have configuration directives in nginx the error that gave me was this:

2018/01/10 13:32:20 [warn] 13508 # 0: duplicate MIME type "text / xml" in /var/www/vhosts/system/domain/conf/vhost_nginx.conf:7

but right now the file does not contain anything since I delete everything, I can not find more errors
nginx tells me 404 not found

edit:
I had not noticed but in the plesk registers I can find that the nginx errors always add an index.html to the url, that is why it tells me that the page does not exist because I do not use the index html my url is like this:
/products/
and nginx says that the
/products/index.html not found

plesk tells me that I have an error in
usr / local / psa / admin / plib / Template / Writer / Abstract.php
but I do not know how to fix it, I do not know if this is the nginx problem
 
Last edited:
The problem is NGINX always ignore .htaccess directives and you need to convert them to NGINX format. You can find a plugin to "convert .htaccess to nginx" to start.
Don't forget to uncheck "Serve static files directly by nginx ", this is the only way to accept "Additional nginx directives"

Is not a config problem, is the NGINX architecture itself.

Best regards,
Horacio
 
everything was working correctly but I made a bad configuration and now it does not work, plesk sent me an email to solve it but I do not know how to do it, it tells me to regenerate the configuration files of the server templates.

I do not know what he is referring to or how to do it.
 
But you need to regenerate in case of ERROR 502, not this case with 404.

First, try what I suggested on my previous message and let me know if it works. If not, send me in private message what instructed Plesk to solve it.
 
disabling nginx the urls work well with apache the plesk message is as follows:


Unable to generate the web server configuration file on the host because of the following errors:

Template_Exception: nginx: [emerge] open () "/var/www/vhosts/system/host/conf/vhost_nginx.conf" failed (2: No such file or directory) in /etc/nginx/plesk.conf. d / ip_default / domain.conf: 98
nginx: configuration file /etc/nginx/nginx.conf test failed

file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0

Please solve the errors in web server configuration templates and generate the file again.


I do not know how to regenerate those files since the error was corrected but the files were not regenerated
 
I did it and they appeared to me errors:


Repairing server-wide configuration parameters for web servers .. [2018-01-10 19:48:12] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-server'] with exit code [255]
[FAILED]
- httpdmng failed:
Updating the file of sharing passwords and permissions of users
according to actual information ................................. [OK]
Repairing web server configuration for all domains. This aspect
can be used with individual domains ("plesk repair web
example.com"), and on the server level ("plesk repair web") ..... [2018-01-10 19:48:18] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-all'] with exit code [1]
[FAILED]
- httpdmng failed: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: Empty error message from utility.
 
Ok, in the worst scenario try this two lines:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa -e"delete from Configurations"
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
 
Nothing worked either:

Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: Empty error message from utility.
 
This is the last error that obtube:

The web server could not be configured: Execution failed. Command: httpdmng Arguments: Array ([0] => --reconfigure-all) Details: Execution failed. Command: httpdmng Arguments: Array ([0] => --reconfigure-server [1] => -no-restart) Details: Empty error message from utility.

ERROR: Class 'Template_Writer_Webserver_Abstract' not found (Apache.php:4)

thanks for your help
 
Last edited:
hello again, I can not ask for support in plesk because because I hire because I hire the tester, it tells me that it can not support me.

In order the problem is this:

Fatal error: class 'Template_Writer_Webserver_Abstract' was not found in /usr/local/psa/admin/conf/templates/default/server.php

how can I regenerate 'Template_Writer_Webserver_Abstract'
something can be done right?
 
Back
Top