Nginx conf file resets to defualt everyday
Hello everyone, Hope you can help me.
I recently installed Nginx Manager in my VPS with cPanel due application requeriments. Since then, everytime I change my /etc/nginx/conf.d/users/domain.conf file it restarts once a day to default configuration.
This is causing me a lot of troubles because I happens at night so my application breaks down.
I've used nginx before but this is my very first time that I use with cPanel so I'm not feel safe to change files.
Thank you for your help.
-
I have done what it says on "User Configuration" created a /etc/nginx/conf.d/users/username/domainname/domain.conf added my nginx configuration and then I got this error: nginx: [emerg] "server" directive is not allowed here in /etc/nginx/conf.d/users/username/domainname/domain.conf:1 Then I tried on /etc/nginx/conf.d/server-includes/domain.conf and got same error. (I have 2 domains in my vps) Then I realized that somehow one of my domains, domainA.conf its empty but domainB.conf (the one I'm using and editting everyday after it resets) has a nginx default config, even I deleted and made my "User Configuration" and updated the server it automatically creates again domainB.conf with nginx default config. How can I stop this just like my domainA.conf that keeps empty. After all this I realized again that my domainB.conf has a "include" so on my "User Confugration" I just kept what I need but then since my domainB.conf has a "location / { ... }" I cannot rewrite and show a duplicate error. 0 -
It might be best to create a ticket for this issue so we can see the specific file, configurations, and the duplicate error. Could you create that ticket and then post the number here so I can follow along? 0 -
Thanks this is the ticket #94495954 0 -
Thanks for that - I'm following along on my end now. 0 -
I see we recommended placing the customizations in /etc/nginx/conf.d/users/username/domain.com/custom.conf - let us know once you've had a chance to test that! 0 -
I want to use Nginx + Varnish Cache for Magento 2.4 I have the same problem like abraham93. My mainproblem is that Varnish needs port 80 for working. Is there a solution to deactivate the overwriting of listen ports in /etc/nginx/conf.d/users/user.conf ? 0 -
@caos989 - there is not a supported way to make that change. Our implementation of Nginx is designed for frontend caching to the Apache service, so it will always attempt to use the next highest port number, which is typically 81 and 444. 0 -
@caos989 - there is not a supported way to make that change. Our implementation of Nginx is designed for frontend caching to the Apache service, so it will always attempt to use the next highest port number, which is typically 81 and 444.
81 and 444 for NGINX would be fine. 8080 and 443 even better. My Apache is running on 8181 and 444 now. Right now my nginx is getting resettet to Port 80 and 443 everytime so It's blocking Varnish from starting. Can you tell me where is the file that tell my user.conf file to change the Port to 80?0 -
There isn't a way to change that behavior at this time. If you'd like to submit a feature request to have us add this customization I can bring it up with the team during our next features meeting. 0 -
I made a request :) I hope you can change this because I think there are a lot of Magento users who can benefit from this. 0 -
I did get that approved. I haven't done the features for this week yet, so I'll get that added to this week's meeting! 0 -
are there any updates done? 0 -
At this time, it isn't something we plan to implement. 0
Please sign in to leave a comment.
Comments
14 comments