How inside in my Nginx configuration directory, create a new file named xy.conf, and after that file, I need to put it inside the server block on my main Nginx config
In my installation, I have 2 websites. I need that in the first one.
How inside in my Nginx configuration directory, create a new file named xy.conf, and after that file, I need to put it inside the server block on my main Nginx config
In my installation, I have 2 websites. I need that in the first one.
/var/www/domain.com/conf/nginx
That's where you place your custom configurations. There is an include
inside the server
block which defines domain.com
.
Don't forget to reload or restart Nginx after placing your files in the conf
directory.
portofacil server said ''/var/www/domain.com/conf/nginx : Is a directory''
That's because it indeed is a directory.
I don't understand what you're trying to say...
portofacil Sorry, about that. For example, if I write wo site edit mydomain.com I can write a code.
Please tell me every step or if I must type something before /var/www/domain.com/conf/nginx, so that I can write it my custom conf.
Yes, you should "navigate" to the right directory:
cd /var/www/domain.com/conf/nginx
Then edit your file:
vim magic-config.conf
(Or nano
, or whatever you prefer.)
When you finish editing your .conf
file, test whether it's okay:
nginx -t
If everything is fine, reload it.
service nginx reload
Perhaps you need to sudo
something; I always assume people are using root
to work on their servers, but I might be wrong.
But you know that Nginx FastCGI Cache does the same things, and you can easy enabled it using WordOps ?
Hosted by VirtuBox