Apache22 address forwarding Configuration

Source: Internet
Author: User

Apache22 address forwarding configuration instructions:

Step 1: Load The mod_vhost_alias module.
Remove the # Before loadmodule vhost_alias_module modules/mod_vhost_alias.so in httpd. conf and httpd. Default. conf.

Step 2: Modify the virtualhost under the httpd. conf file.
Add an ifmodule
<Virtualhost *: 80>
Serveradmin server @????. Com
DocumentRoot/usr/local/www/apache22/data/
Servername www .????. Com
Serveralias ????. Com
UseCanonicalName off
Errorlog/var/log/dummy-www .????. Com-error_log
Customlog/var/log/dummy-www .????. Com-access_log common
<Ifmodule mode_rewrite.c>
Rewriteengine on
Rewritecond % {http_host} ^ group /.???? /. Com // * $
Rewritecond % {request_uri }! ^ (/Index/. php |/index/. html |/index/. htm)
Rewriterule ^/(. [a-zA-Z0-9 _] +) $ http: // www .????. COM/test. php? Id = $1 [l]
Rewritecond % {http_host} ^ user /.???? /. Com // * $
Rewritecond % {request_uri }! ^ (/Index/. php |/index/. html |/index/. htm)
Rewriterule ^/(. [a-zA-Z0-9 _] +) $ http: // www .????. COM/test1.php? Userid = $1 [l]
</Ifmodule>
</Virtualhost>

Step 3: Modify virtualdocumentroot and point to the folder directory
Modify the content in parentheses following {request_uri}. If the root directory contains this file or folder, write it.
Restart Apache.

 

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.