Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
jb-vpn.uk Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Troubleshooting:Nginx Troubleshooting
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
'''Note:''' Public HTTPS on this VPS is handled by '''Caddy''' (<code>/etc/caddy/Caddyfile</code>). Use [[System:Service Management]] and <code>journalctl -u caddy</code> for edge proxy issues. This guide covers '''legacy host Nginx''' site files and the '''WebApp stack's internal Nginx''' container. Host Nginx is not the active edge proxy for <code>*.jb-vpn.uk</code> services. == Configuration Errors == === Syntax Errors === '''Symptoms''': <code>nginx -t</code> fails with syntax errors '''Solutions''': * Check for missing semicolons * Verify bracket matching * Check for typos in directive names === Duplicate Server Names === '''Symptoms''': Warning about duplicate server_name '''Solutions''': * Check all configuration files in <code>/etc/nginx/sites-enabled/</code> * Remove duplicate server_name entries * Ensure only one config per subdomain == Service Issues == === Nginx Won't Start === ==== '''Check status''': ==== <pre class="lang-bash"> systemctl status nginx </pre> == '''Check logs''': == <pre class="lang-bash"> journalctl -u nginx -n 50 </pre> == '''Test configuration''': == <pre class="lang-bash"> nginx -t </pre> === Nginx Reload Fails === ==== '''Test configuration first''': ==== <pre class="lang-bash"> nginx -t </pre> == '''Check for syntax errors''' in configuration files == == '''Verify file permissions''': == <pre class="lang-bash"> ls -la /etc/nginx/sites-enabled/ </pre> == Log Analysis == === Error Logs === <pre class="lang-bash"> ==== View recent errors ==== tail -f /var/log/nginx/error.log == Search for specific errors == grep "error" /var/log/nginx/error.log </pre> === Access Logs === <pre class="lang-bash"> ==== View recent access ==== tail -f /var/log/nginx/access.log == Analyze traffic == awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn </pre> == Common Configuration Issues == === SSL Certificate Problems === * Verify certificate exists: <code>certbot certificates</code> * Check certificate expiration: <code>openssl x509 -in /etc/letsencrypt/live/domain/cert.pem -noout -dates</code> * Renew if needed: <code>certbot renew</code> === Proxy Issues === * Check proxy_pass URL is correct * Verify target service is accessible * Check proxy headers are set correctly == Related Documentation == * [Adding Services](index.md) - Service configuration * [Service Management](service-management.md) - Service management [[Category:Documentation]] [[Category:Documentation/Troubleshooting]]
Summary:
Please note that all contributions to jb-vpn.uk Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Jb-vpn.uk Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Troubleshooting:Nginx Troubleshooting
Add topic