Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sudo adduser **USERNAME**
sudo su **USERNAME**
cd ~/
mkdir site1.com
cd site1.com
mkdir public
sudo nano /etc/php/7.2/fpm/pool.d/**USERNAME**.conf
[**USERNAME**]
user = **USERNAME**
group = **USERNAME**
listen = /var/run/php7.2-fpm-**USERNAME**.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /
nano /etc/nginx/sites-available/**USERNAME**
# HTTPS site için
server {
listen 443;
root /home/**USERNAME**/site1.com/public;
index index.php index.html;
server_name site1.com;
ssl on;
ssl_certificate /home/**USERNAME**/certificates/site1.com.crt;
ssl_certificate_key /home/**USERNAME**/certificates/site1.com.key;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php7.2-fpm-**USERNAME**.sock;
}
}
# HTTP site için
server {
listen 80;
root /home/**USERNAME**/site1.com/public;
index index.php index.html;
server_name site1.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php7.2-fpm-**USERNAME**.sock;
}
}
sudo ln -s /etc/nginx/sites-available/**USERNAME** /etc/nginx/sites-enabled/
service php7.2-fpm restart
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.