redhat:web-server-redhat:virtual-hosts-redhat

This is an old revision of the document!


Configure a virtual host directive for your domain.

FIXME

https://www.rosehosting.com/blog/apache-virtual-hosts-on-centos/

# vim /etc/httpd/conf.d/your_domain.conf

<VirtualHost *:80>
ServerAdmin [email protected]_domain.com
DocumentRoot "/var/www/html/your_domain/"
ServerName your_domain.com
ServerAlias www.your_domain.com
ErrorLog "/var/log/httpd/your_domain.com-error_log"
CustomLog "/var/log/httpd/your_domain.com-access_log" combined

<Directory "/var/www/html/your_domain/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

# mkdir /var/www/html/your_domain/
# chown apache:apache -R /var/www/html/your_domain/
  • redhat/web-server-redhat/virtual-hosts-redhat.1516356378.txt.gz
  • Last modified: 2018/01/19 11:06
  • by michael