• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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