Apache configuration, apache

Source: Internet
Author: User

Apache configuration, apache

<VirtualHost *:80>    ServerAdmin webmaster@dummy-host2.example.com    ServerAdmin webmaster@dummy-host.example.com    DocumentRoot "e:/www/WapSources/01 code"    ServerName wap.weilan.com    #ServerAlias www.dummy-host.example.com    #ErrorLog "logs/dummy-host.example.com-error.log"    #CustomLog "logs/dummy-host.example.com-access.log" common        <Directory "e:/www/WapSources/01 code">        Options Indexes FollowSymLinks        AllowOverride all        Order allow,deny        Allow from all    </Directory>    <IfModule mod_rewrite.c>        RewriteEngine on        RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)        RewriteRule .* - [F]        Rewriterule ^(.*)/(.*)/index.html$ $1/index.php?$2        Rewriterule ^(.*)/(.*)/index(\d+).html$ $1/index.php?$2&page=$3        Rewriterule ^(.*)/(.*)/a(\d+)\.html$ $1/index.php?$2/$3        Rewriterule ^(.*)/u/(\d+)/(.*)$ $1/index.php?u&$2&$3        Rewriterule ^(.*)/u/(\d+)/(.*)/$ $1/index.php?u&$2&$3        Rewriterule ^(.*)/u/(\d+)$ $1/index.php?u&$2        Rewriterule ^(.*)/u/(\d+)/$ $1/index.php?u&$2        Rewriterule ^(.*)/(.*)/index.html\?(.*) $1/index.php?$2&$3        Rewriterule ^(.*)/(.*)/index(\d+).html\?(.*) $1/index.php?$2&$3        Rewriterule ^(.*)/index.action(.*) $1/index.php$3    </IfModule>    </VirtualHost>

Simplified Version:

# Specify the IP address of the network card of the user to access the VM.
NameVirtualHost *: 80
<VirtualHost *: 80>
# Specify the Domain Name of the VM
ServerName yangzailu.com
# Specify a virtual directory
DocumentRoot "e:/www/web1"
# Specify Directory Permissions
<Directory "e:/www/web1">
Options Indexes FollowSymLinks
AllowOverride All
Order Deny, Allow
Deny from all
Allow from all
</Directory>
</VirtualHost>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.