Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
development:nginx:start [2021/07/01 15:23]
kalenpw removed
— (current)
Line 1: Line 1:
-====== Nginx ====== 
-  * [[:development:deploy:nginx | Web Server]] 
  
----- 
-===== Reverse Proxy ===== 
-Useful for services that run on abnormal ports, but you want to have clean urls to access them 
- 
-<file nginx reverse_proxy.conf> 
-server { 
-    server_name example.domain.com; 
-    location / { 
-        proxy_pass http://127.0.0.1:8000; 
-    } 
-} 
-</file> 
----- 
- 
-===== Redirect all URLs to root ===== 
-Used, for example, on kalen.pw so any non-found files are redirected to the homepage (as opposed to serving a 404) 
-<code nginx> 
-location / { 
-    if (!-e $request_filename) { 
-        rewrite ^ / permanent; 
-    } 
-} 
-</code> 
-----