-
-
Save yunlzheng/b6d525ab9fb888d8120f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| sudo aptitude -y install nginx | |
| cd /etc/nginx/sites-available | |
| sudo rm default | |
| sudo cat << EOF > jenkins | |
| upstream app_server { | |
| server 127.0.0.1:8080 fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| listen [::]:80 default ipv6only=on; | |
| server_name jenkins.domain.tld; | |
| location / { | |
| proxy_pass http://localhost:8080; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_connect_timeout 150; | |
| proxy_send_timeout 100; | |
| proxy_read_timeout 100; | |
| proxy_buffers 4 32k; | |
| client_max_body_size 8m; | |
| client_body_buffer_size 128k; | |
| } | |
| } | |
| EOF | |
| sudo ln -s /etc/nginx/sites-available/jenkins /etc/nginx/sites-enabled/jenkins | |
| sudo service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment