Thứ Ba, tháng 2 18, 2014

Setting Alias on Xampp

accepted
You need to have two entries for it, an alias and a directory. You should have an entry in your /opt/lampp/etc/extra/httpd-xampp.conf (source) that looks like one of the following code blocks. Some configuration options have changed, more information can be found in the document Upgrading to 2.4 from 2.2
Apache 2.2 Config:
Alias /opt/ "C:/opt/"
<Directory "C:/opt">
      Options Indexes FollowSymLinks MultiViews ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
</Directory>

Apache 2.4 Config:
Alias /opt/ "C:/opt/"
<Directory "C:/opt">
      Options Indexes FollowSymLinks MultiViews ExecCGI
      AllowOverride All
      Require all granted
</Directory>
The Alias section defines where your virtual directory and real directory are located. In this example website.com/opt/ (or localhost/opt) would point to C:/opt on your hard drive.
The Directory part definates how apache should handle content served from this location, it would function like any other Directory entry, so it might be a good idea to just copy the one from your root entry and make them similar.
This will also require mod_alias to be enabled, check in your httpd-xampp.conf and make sure that the entry for it is not commented out. After any changes to your conf file you will need to restart apache for the changes to be made active.

Không có nhận xét nào:

Đăng nhận xét