Monday, March 7, 2011

apache virtual host configuration

httpd.conf file setting

<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html

</IfModule>

make file /etc/httpd/conf.d/vhost.conf


NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.test.local
DocumentRoot /home/USER_NAME/public_html/www.test.com
<Directory /home/USER_NAME/public_html/www.test.com>
AllowOverride All
Options FollowSymlinks
Order Allow,Deny
Allow From All
</Directory>
</VirtualHost>


commond prompt
chcon -R -t htppd_sys_content_t /home//public_html
setsebool -P httpd_enable_homedirs true

/etc/hosts file entry

127.0.0.1 www.test.local

No comments:

Post a Comment

how to see xml preview in browser php

xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8');                 $xml->preserveWhiteSpace = false; ...