• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx:

webcity

New Pleskian
Hi,

I'm running Plesk Obsidian Web Pro Edition Version 18.0.25.

I've made changes in Apache & nginx Settings for one of my domains.
Incorrectly I added
Code:
.php
in the "Disable caching for locations" box. When I pressed the OK button to accept the changes I got an error message. I removed the code from the box and now when I press Apply, I get the error:

Invalid nginx configuration: nginx: [emerg] pcre_compile() failed: nothing to repeat in "*.php" at "*.php" in /etc/nginx/plesk.conf.d/vhosts/mydomain.co.uk.conf:47 nginx: configuration file /etc/nginx/nginx.conf test failed Unable to use the current nginx configuration file and to rollback to the previous version of the file because they both contain invalid configuration.

I can't seem to remove the code from the box, when I delete the code and press Apply or OK.

And now I get the error message at the top of my Websites and Domains:

Code:
New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] pcre_compile() failed: nothing to repeat in "*.php" at "*.php" in /etc/nginx/plesk.conf.d/vhosts/mydomain.co.uk.conf:47 nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter

I've tried to generate the broken configuration files but it still has the error.

Can you suggest a solution to the problem? Is there a file I can edit to restore the file to the original settings?

Many thanks
 
Hi,

Thanks for your help.

I tried that option and also the "Webserver Configurations Troubleshooter" repair option too.

Both option fail with can't create new file.

Many thanks
 
Hi,

Thanks for your help.

I tried that option and also the "Webserver Configurations Troubleshooter" repair option too.

Both option fail with can't create new file.

Many thanks
Try it in ssh
Other way, try to edit and put correctly file /etc/nginx/plesk.conf.d/vhosts/mydomain.co.uk.conf, then restart nginx, then go again to nginx/apache option of the domain an save the change without any adicional line
Another way is to delete file directly rm -f /etc/nginx/plesk.conf.d/vhosts/mydomain.co.uk.conf then restart nginx, then go again to nginx/apache option of the domain an save the change without any adicional line
 
Hi,

Thanks for your help.

I tried deleting the file, restarting nginx, a new mydomain.co.uk.conf file is created but it is still using the old settings with the error. When deleting the .php and trying to save, I still get the error.

I also get the error message emailed to me:

Code:
Unable to generate the web server configuration file on the host <host.mydomain.co.uk> because of the following errors:

Template_Exception: nginx: [emerg] pcre_compile() failed: nothing to repeat in "*.php" at "*.php" in /etc/nginx/plesk.conf.d/vhosts/ukclassifieds.co.uk.conf:47
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 resolve the errors in web server configuration templates and generate the file again.

Can you suggest any other options?

Many thanks
 
Hi,

Thanks for your help.

I tried deleting the file, restarting nginx, a new mydomain.co.uk.conf file is created but it is still using the old settings with the error. When deleting the .php and trying to save, I still get the error.

I also get the error message emailed to me:

Code:
Unable to generate the web server configuration file on the host <host.mydomain.co.uk> because of the following errors:

Template_Exception: nginx: [emerg] pcre_compile() failed: nothing to repeat in "*.php" at "*.php" in /etc/nginx/plesk.conf.d/vhosts/ukclassifieds.co.uk.conf:47
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 resolve the errors in web server configuration templates and generate the file again.

Can you suggest any other options?

Many thanks
If there is no sensible data on your server, give us your server access by MP and I can try to review it.
 
Hi,

Thanks for your help and kind offer, it is much appreciated. The sites on the server contain customers data so I would like to try and solve the problem if possible without giving access to the server.

I'll try and dig around the forums some more to see if I can find a resolution to the problem, unless anyone could suggest any other options to try?

Many thanks
 
Hi,

Thanks for your help and kind offer, it is much appreciated. The sites on the server contain customers data so I would like to try and solve the problem if possible without giving access to the server.

I'll try and dig around the forums some more to see if I can find a resolution to the problem, unless anyone could suggest any other options to try?

Many thanks
I understand of course.
I recommand you delete file for now
/etc/nginx/plesk.conf.d/vhosts/ukclassifieds.co.uk.conf
and restart nginx

Almost you will have web service...
 
Hi,

I'm still trying to find resolve the problem.

I have deleted the /etc/nginx/plesk.conf.d/vhosts/mydomain.conf , when generating the new file what is the backup or other file that it uses to create the new file? This seems to have the wrong settings too.

Thanks for your help
 
Back
Top