Created
October 9, 2018 12:54
-
-
Save marcoberri/67546c24890b87cd0c04ae5bd5fcddd6 to your computer and use it in GitHub Desktop.
Configuration nginx for remove angular - FontAwensome version from url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
include /usr/share/nginx/modules/*.conf; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
include /etc/nginx/conf.d/*.conf; | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name jhis-int.aslto5.local; | |
root /opt/html/; | |
# Load configuration files for the default server block. | |
include /etc/nginx/default.d/*.conf; | |
location / { | |
} | |
location /other/ { | |
alias /opt/other/; | |
} | |
location /static/ { | |
alias /opt/static/html/; | |
index index.html; | |
# add_header X-debug-message $request_uri always; | |
if ($request_uri ~* ^.+\.(woff2|otf|woff|tff)\?v=(.*)$){ | |
rewrite ^(.*)$ $uri? permanent; | |
} | |
try_files $uri$args $uri$args/ $uri/ /index.html =404; | |
error_log /var/log/nginx/static_error.log; | |
access_log /var/log/nginx/static_access.log; | |
} | |
location /api/ { | |
proxy_pass http://127.0.0.1:8090/; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-Port $server_port; | |
error_log /var/log/nginx/api_error.log; | |
access_log /var/log/nginx/api_access.log; | |
} | |
error_page 404 /404.html; | |
location = /40x.html { | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment