server-side/apache

Mac XAMPP VirtualHost 설정

C/H 2015. 12. 28. 08:30

Mac XAMPP VirtualHost 설정

# sudo vi /etc/httpd/conf/httpd.conf
# Include etc/extra/httpd-vhosts.conf #주석제거
# httpd-vhosts.conf 설정
<virtualhost *:80>
	ServerAdmin username@domain.com
	DocumentRoot "/Users/username/workspace/project"
	ServerName domain.com
	ErrorLog "logs/doamin.com-error.log"
	CustomLog "logs/domain.com-access.log" common
	<directory "/Users/username/workspace/project">
		#http://stackoverflow.com/questions/18365500/xampp-mac-virtual-host-showing-403
		ServerSignature Off
		Options Indexes FollowSymLinks IncludesNoExec
		AllowOverride All

		#Order allow,deny  <- You can remove this
		#Allow from all    <- and that
 		
		# Insert the following:
		Require all granted
	</directory>
</virtualhost>

DNS cache 갱신

sudo vi /private/etc/hosts
dscacheutil -flushcache


반응형