Introduction
To install LEMP server you can click on below link
http://www.techs2resolve.in/2018/01/how-to-install-and-configure-lemp-in.html
After you have installed LEMP follow the below step to configure.
1. Copy the default configuration file with your domain name :-
2. Now edit your conf file like below :-
3. You have to make 3 changes in conf file like below :-
1. Remove default_server parameter from line no 17
2. Change the Document Root path with your folder on line no 36
3. Change the server_name with your domain name on line 41
The file will look like below :-
4. Create the directory for your data to be stored :-
5. Create a index.php file inside your Document Root Directory :-
6. Now enable the site so that we can check :-
7. Now test in browser :-
That's it
Please do Comments, Likes and Share
In this tutorial we are going to see how to configure virtualhost in Nginx on Ubuntu-16.04 server. For the demo purpose I have taken AWS-EC2 instance. I have successfully installed LEMP server.
To install LEMP server you can click on below link
http://www.techs2resolve.in/2018/01/how-to-install-and-configure-lemp-in.html
After you have installed LEMP follow the below step to configure.
Note:- Please make sure that you replace the domain name with your own like my :- test.techs2resolve.in. Also create A record in Domain DNS which points to your servers Public IP.
For testing purpose you can add host entry in your local systems host file /etc/hosts like below:-
192.168.1.10 test.techs2resolve.in1. Copy the default configuration file with your domain name :-
sudo cp -av /etc/nginx/sites-available/default /etc/nginx/sites-available/test.techs2resolve.in
2. Now edit your conf file like below :-
sudo vim /etc/nginx/sites-available/test.techs2resolve.in
3. You have to make 3 changes in conf file like below :-
1. Remove default_server parameter from line no 17
2. Change the Document Root path with your folder on line no 36
3. Change the server_name with your domain name on line 41
The file will look like below :-
4. Create the directory for your data to be stored :-
sudo mkdir /var/www/html/test.techs2resolve.in
5. Create a index.php file inside your Document Root Directory :-
sudo vim /var/www/html/test.techs2resolve.in/index.php Enter the below code in file :- <?php phpinfo(); ?>
6. Now enable the site so that we can check :-
cd /etc/nginx/sites-enabled/ sudo ln -s /etc/nginx/sites-available/test.techs2resolve.in .
7. Now test in browser :-
That's it
Please do Comments, Likes and Share
02:29
Tags :
AWS
,
Linux
,
Ubuntu-16.04
Subscribe by Email
Follow Updates Articles from This Blog via Email
No Comments