Fedora17 configure virtual hosts

Source: Internet
Author: User
Apacha of ora17 virtual host fedora has been updated to version 2.2.2. The biggest difference between this version and the popular version on the network lies in: www.2cto. com1. the root directory of the server is transferred to/var/www/instead of/usr/loc...
Apacha for Ora 17 virtual host configuration has been updated to 2.2.2. The biggest difference between this version and the popular version on the network lies in: www.2cto.com 1. the root directory of the server is/var/www/instead of/usr/local/www /. 2. the server configuration file directory is no longer/etc/ini. d/, but/etc/hpptd/conf (of course, I prefer to use conf to configure virtual hosts. d directory instead of adding the configuration of the virtual host directly after the server configuration ). Start configuration steps below www.2cto.com: 1. create yourdomain.com. (If the name is not Chinese, use OK.) shell command: mkdir/var/www/yourdomain.com 2. modify the server configuration file 2.1 and directly modify it in the original server configuration file (/etc/httpd/conf/httpd. conf) command: vi/etc/httpd/conf/httpd. add conf at the end of the file: Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow, deny Allow from all   DocumentRoot/var/www/yourdomain.com/ServerName yourdomain.com # The name here is the same as the name above Of course, you can also find the corresponding tag in the configuration file, remove #, and add the content. The most important thing is to see what the file looks like, what is the content to be added? the quotation marks must be separated by commas. the virtual host configuration is definitely not successful. 2.2 Write your own VM configuration file command: vi/etc/httpd/conf, d/vhost content is the same as above. 3. edit the hosts file so that the server can resolve your domain name. Command: vi/etc/hosts. Add a new line: 127.0.0.1 your. domain. Note that the name here is the same as the name after ServerName in the server configuration. 4. everything is ready. restart the server: Command: service httpd restart or: systemctl restart httpd. the above one is recommended. 5. test whether the VM is available: 5.1 Command: vim/var/www/youdomain.com/info.php content: 5. open the browser, enter youdomain.com/info.php in the address bar, and then output. source http://my.oschina.net/u/863606/blog/87349
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.