Skip to content

Instantly share code, notes, and snippets.

@goeroeku
Forked from fer-ri/default
Created November 1, 2016 12:04
Show Gist options
  • Save goeroeku/bfdb442710399ed984009ace4bae0ee5 to your computer and use it in GitHub Desktop.
Save goeroeku/bfdb442710399ed984009ace4bae0ee5 to your computer and use it in GitHub Desktop.
Default Nginx Conf Debian / Ubuntu
server {
listen 80;
root /home/nginx/domains/default/public_html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
@goeroeku
Copy link
Author

goeroeku commented Nov 2, 2016

Post Installation

Add nginx user

useradd -s /bin/false nginx
mkdir -p /home/nginx/domains/default/public_html
chown -R nginx: /home/nginx

PHP FPM

Buka /etc/php5/fpm/pool.d/www.conf
Ubah www-data menjadi user owner pada listen-user, listen-group, listen-port
Ubah php5-fpm-www-data.sock meniadi php5-fpm.sock ### NGINX
Buka /etc/nginx/nginx.conf, ubah www-data menjadi user owner ### OpenVPN

https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-debian-8

Done ..

@goeroeku
Copy link
Author

goeroeku commented Nov 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment