Install software-properties-common
sudo apt-get install software-properties-common
Add Repo
sudo add-apt-repository ppa:olipo186/git-auto-deploy
| cd ~ | |
| sudo apt-get update | |
| 1. Install PHP and Nginx | |
| #apt-get install software-properties-common | |
| sudo apt-get -y install nginx php7.0 php7.0-fpm php7.0-mbstring php7.0-xml git composer | |
| 2. Config Nginx |
Install software-properties-common
sudo apt-get install software-properties-common
Add Repo
sudo add-apt-repository ppa:olipo186/git-auto-deploy
| #!/bin/bash | |
| ##################################################################### | |
| ## IMPORTANT ## | |
| # Run this script with root (sudo su -), wont work if run as sudo. | |
| # Change the variables as needed. | |
| ###################################################################### | |
| USER=youruser # User that will have ownership (chown) to /usr/local/bin and /usr/local/lib | |
| USERHOME=/home/${USER} # The path to the users home, in this case /home/youruser | |
| PYSHORT=3.6 # The Python short version, e.g. easy_install-${PYSHORT} = easy_install-3.6 | |
| PYTHONVER=3.6.1 # The actual version of python that you want to download from python.org |
| # | |
| # Auth filter /etc/fail2ban/filter.d/nginx-auth.conf: | |
| # | |
| # Blocks IPs that makes too much accesses to the server | |
| # | |
| [Definition] | |
| failregex = ^<HOST> -.*"(GET|POST).*HTTP.*" | |
| ignoreregex = |
| server { | |
| listen 80; # Listen on port 80 for IPv4 requests | |
| server_name build.yourdomain.com; | |
| access_log /var/log/nginx/jenkins_access.log; | |
| error_log /var/log/nginx/jenkins_error.log; | |
| location ~ ^/static/[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\/(.*)$ { | |
| #rewrite all static files into requests to the root |