Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######### Step One— Create a New Directory ##########
- sudo mkdir -p /usr/share/nginx/html/domain.com/public_html
- ######## Step Two—Grant Permissions #########
- sudo chown -R www-data:www-data /usr/share/nginx/html/domain.com/public_html
- ########### supaya bisa dibaca ###########
- sudo chmod 755 /usr/share/nginx/html
- ############# tes ################
- sudo nano /usr/share/nginx/html/domain.com/public_html/index.html
- <html>
- <head>
- <title>www.example.com</title>
- </head>
- <body>
- <h1>Success: You Have Set Up a Virtual Host</h1>
- </body>
- </html>
- ######### Step Four—Create the New Virtual Host File ###########
- sudo cp /etc/nginx/sites-available/default /etc/nginx/sites-available/domain.com
- sudo nano /etc/nginx/sites-available/domain.com
- edit sesuai keinginan
- ####### aktivasi virtualhost #########
- sudo ln -s /etc/nginx/sites-available/domain.com /etc/nginx/sites-enabled/domain.com
- restart
- sudo service nginx restart
- related: http://pastebin.com/bYGZ7q2y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement