1 |
CentOS7 httpd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
##### httpd install ##### sudo yum install httpd sudo systemctl start httpd sudo systemctl enable httpd ##### httpd setting ##### sudo mkdir -p /var/www/dev.easywaru.com/html sudo chown -R $USER:$USER /var/www/dev.easywaru.com/html sudo chmod -R 755 /var/www sudo nano /var/www/dev.easywaru.com/html/index.html sudo mkdir /etc/httpd/sites-available sudo mkdir /etc/httpd/sites-enabled sudo nano /etc/httpd/conf/httpd.conf IncludeOptional sites-enabled/*.conf(Add this line to the end of the file: ) sudo nano /etc/httpd/sites-available/dev.easywaru.com.conf <VirtualHost *:80> ServerName www.dev.easywaru.com ServerAlias dev.easywaru.com DocumentRoot /var/www/dev.easywaru.com/html ErrorLog /var/www/dev.easywaru.com/error.log CustomLog /var/www/dev.easywaru.com/requests.log combined </VirtualHost> sudo ln -s /etc/httpd/sites-available/dev.easywaru.com.conf /etc/httpd/sites-enabled/dev.easywaru.com.conf |