Last active
February 26, 2023 17:10
-
-
Save ahmeti/31fc31f5e78cf6b60c207b28fbba0f2e to your computer and use it in GitHub Desktop.
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
# Şifreli Giriş İçin | |
sudo adduser **USERNAME** | |
# Şifresiz Giriş SSH İçin | |
sudo adduser **USERNAME** --disabled-password |
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
sudo su **USERNAME** | |
cd ~/ | |
mkdir site1.com | |
cd site1.com | |
mkdir public |
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
# PHP 7 | |
sudo nano /etc/php/7.2/fpm/pool.d/**USERNAME**.conf | |
# PHP 8 | |
sudo nano /etc/php/8.0/fpm/pool.d/**USERNAME**.conf |
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
[**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 = / | |
# PHP 8 | |
listen = /run/php/php8.0-fpm-**USERNAME**.sock |
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
nano /etc/nginx/sites-available/**USERNAME** |
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
# 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; | |
} | |
} |
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
# 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; | |
} | |
} |
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
sudo ln -s /etc/nginx/sites-available/**USERNAME** /etc/nginx/sites-enabled/ |
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
sudo usermod -a -G www-data **USERNAME** | |
sudo chown -R **USERNAME**:www-data /home/**USERNAME**/ |
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
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