Apache deploy Web pages -Ubuntu16.04

Whether Tencent Ali clouds or cloud, configure security group rules, open port 80

 

Then connect to the remote server installation apache2

1, the root account to log in

2, the command line, enter ubantu: apt-get update

3, enter: apt-get install apache2 continue to enter y on the line

4, after the installation is complete Input: /etc/init.d/apache2 restart returns the result [OK] Description start successfully

 

This installation was successful

Then upload the page

I use a windows system so using a winSCP to connect (if you can use a Linux SSH)

 

Fill in the host name of your server public IP fill in your user name administrator account (Ali cloud server to buy time to set up a root account, before I use Tencent cloud when insufficient account privileges that set the time to buy, not upload files, you need to reset the root account, assign permissions Tencent cloud if you use, you can refer to this blog links)

Linux port number is put through the ssh port 22, fixed

 

After logging in, we upload the html page to the directory var / www / html, not on the new

Each file apache2 folder introduction

/ Etc / apache2: location of the profile location file lib: / usr / lib location of startup files: /etc/init.d/apache2 web storage location: / var / www location where the software: / usr / share / apache2 then our configuration is complete

Then we can visit their website directly with the domain name, the domain name can not be used to access the IP

 

 

Guess you like

Origin www.cnblogs.com/yanruizhe/p/11456887.html