I have just re-installed the system over the past few days and need a lot of configuration. I am a lamper. Of course I want to configure Apache + PHP + MySQL. The release version I used is opensuse13.1 ,.
After installing Apache, you must enable the URL rewriting function to work with the development of the project. Open the configuration file/etc/apache2/httpd. conf of Apache, find AllowOverride none, change AllowOverride all, and change option none to option followsymlinks. This does not work, but it also needs to load the rewrite module.
The main function of rewrite is to rewrite the URL and rewrite the URL to achieve static (pseudo-static). The purpose of this operation is to facilitate the search engine and users' understanding, to increase the search engine's indexing quantity.
Return to the/etc/apache2/httpd. conf file and you can see this line.
# |-- sysconfig.d/loadmodule.conf . . . . . [*] load these modules
The Apache module File is stored in/etc/apache2/sysconfig. d/loadmodule. conf.
Go into this file and check whether the file contains many statements for Loading modules. So I am very excited to load the rewrite module File and restart Apache, then I went into the file and found that the statement I just wrote was missing. So I checked the file carefully and found that:
## Files in this directory are created at apache start time by /usr/sbin/rcapache2 # Do not edit them!## as listed in APACHE_MODULES (/etc/sysconfig/apache2)
It turns out that this file cannot be edited. It can only be modified in the/etc/sysconfig/apache2 file, so you can check it again. Found:
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 reqtimeout authn_core authz_core"
It turns out that this is the statement for Apache to load the module. Add rewrite to the end, restart Apache, and find that it is successful, and/etc/apache2/sysconfig. d/loadmodule. A rewrite statement is added to the conf file.
LoadModule rewrite_module /usr/lib64/apache2-prefork/mod_rewrite.so