読者です 読者をやめる 読者になる 読者になる

ITの隊長のブログ

ITの隊長のブログです。いや、まだ隊長と呼べるほどには至っていないけど、日々がんばります。CakePHPとPlayFrameworkを使って仕事しています。最近はAngular2をさわりはじめたお(^ω^ = ^ω^)

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

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


これでよし。と