Apache Static page

Source: Internet
Author: User

Apache Open static page


The main unresolved pit of the blogger:

I first built lamp using a compile and install httpd service, when the static page was opened found in Httpd.conf no LoadModule rewrite_module libexec/mod_ rewrite.so code, manually add in to restart the Apache times wrong;

View the file. Htaccess is also normal:

# BEGIN Wordpress<ifmodule mod_rewrite.c>rewriteengine onrewritebase/rewriterule ^index\.php$-[L]RewriteCond% {request_filename}!-frewritecond%{request_filename}!-drewriterule. /index.php [l]</ifmodule>

Compile and install the httpd version with the following parameters:

#wget Https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.2.31.tar.gz#tar XF httpd-2.2.31.tar.gz #cd Httpd-2.2.31#yum install zlib zlib-devel-y./configure--prefix=/application/apache2.2.31--enable-deflate-- Enable-expires--enable-headers--enable-modules=most--enable-so--with-mpm=worker--enable-rewrite#make#make Install

In short, the problem is to solve

In a simple, easy-to-use, efficient principle, I recommend the use of Yum installation;


Apache implements the actual operation of a static page:

In configuration file httpd.conf:

allowoverride None change to allowoverride All

The file should have LoadModule rewrite_module libexec/mod_rewrite.so, if there is a # comment before the code, remove the comment, if not the code is added manually;

. htaccess file:

# BEGIN Wordpress<ifmodule mod_rewrite.c>rewriteengine onrewritebase/rewriterule ^index\.php$-[L]RewriteCond% {request_filename}!-frewritecond%{request_filename}!-drewriterule. /index.php [l]</ifmodule>

The file is manually added to the file without the above code





This article is from "Little New" blog, please be sure to keep this source http://zhanghongxin.blog.51cto.com/11255031/1853409

Apache Static page

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.