Hello,
I have been following through a few different articles, but am now getting an error.
"listen" directive not allowed here...
listen [::]:443 ssl; # managed by certbot
After I set up certbot it was fine, so I’m not sure what else I have done to affect it.
The only change I have made to the file is adding WordPress bits as below.
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
log_not_found off;
And…
location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
Any help is much appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there,
Can you run the following command to test your Nginx config syntax:
And then share the output here.
Also, can you share your whole Nginx server block here as well?
Regards, Bobby
Thanks @bobbyiliev for your assistance.