~# sudo mkdir -p /usr/share/nginx/website2.com

~# sudo chown -R www-data:www-data /usr/share/nginx/website2.com

~# sudo chmod -R 755 /usr/share/nginx/website2.com

~# sudo cp /etc/nginx/sites-available/website1 /etc/nginx/sites-available/website2

~# sudo nano /etc/nginx/sites-available/website2

Website 1:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/website1;
index index.php index.html index.htm;
server_name website1.com www.website1.com;
location / {

Website 2:
server {
listen 80;
listen [::]:80;
root /usr/share/nginx/website2;
index index.php index.html index.htm;
server_name website2.com www.website2.com;
location / {

Website 3:
server {
listen 80;
listen [::]:80;
root /usr/share/nginx/website3;
index index.php index.html index.htm;
server_name website3.com www.website3.com;
location / {

~# sudo ln -s /etc/nginx/sites-available/website2 /etc/nginx/sites-enabled/website2

~# sudo nginx -t

~# sudo service nginx restart

~# sudo service php7.0-fpm restart

Tinggalkan Komentar :

comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here