ITの隊長のブログ

ITの隊長のブログです。Rubyを使って仕事しています。最近も色々やっているお(^ω^ = ^ω^)

Apacheのバーチャルホストメモ

スポンサードリンク

http://www.flickr.com/photos/55723329@N00/7443947216
photo by psiaki


VirtualHostの簡易導入メモ



Listen 10083

Include virtualhost.conf
  • virtualhost.conf
<VirtualHost *:10083>
    DocumentRoot "/var/www2/htdocs"
    ServerName hostname.localhost

	<Directory "/var/www2/htdocs">
	    #
	    # Possible values for the Options directive are "None", "All",
	    # or any combination of:
	    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
	    #
	    # Note that "MultiViews" must be named *explicitly* --- "Options All"
	    # doesn't give it to you.
	    #
	    # The Options directive is both complicated and important.  Please see
	    # http://httpd.apache.org/docs/2.4/mod/core.html#options
	    # for more information.
	    #
	    Options FollowSymLinks Multiviews
	    MultiviewsMatch Any

	    #
	    # AllowOverride controls what directives may be placed in .htaccess files.
	    # It can be "All", "None", or any combination of the keywords:
	    #   AllowOverride FileInfo AuthConfig Limit
	    #
	    AllowOverride All

	    #
	    # Controls who can get stuff from this server.
	    #
	    Require all granted
	</Directory>

</VirtualHost>
  • /etc/hosts
127.0.0.1 hostname.localhost


これでよし。と