Enable Apache Mod_rewrite in openSUSE

Source: Internet
Author: User
Tags save file

1. Edit the "/etc/sysconfig/apache2" file

Find Apache_modules and you should find a line like

apache_modules="actions alias Auth_basic authn_file authz_host authz_groupfile authz_core authz_user  AutoIndex CGI dir env expires include log_config MIME negotiation setenvif SSL SOCACHE_SHMCB userdir reqtimeout Authn_core PHP7 php5 version"

2. Add "Rewrite" in this line of "",

Such as:

apache_modules="actions alias Auth_basic authn_file authz_host authz_groupfile authz_core authz_user  AutoIndex CGI dir env expires include log_config MIME negotiation setenvif SSL SOCACHE_SHMCB userdir reqtimeout Authn_core PHP7 php5 version rewrite"

3. Run sudo systemctl restart apache2 restart Apache2

Now Apache2 rewrite has been enabled.

4. Edit the /etc/apache2/default-server.conf file using your favorite editor

5. Find allowoverride-This should be in <directory "/srv/www/htdocs" > below

6. Modify allowoverride None to allowoverride all

7. Save file changes and exit

8. Run sudo systemctl restart apache2 restart Apache2

You can write the following in a info.php file in/srv/www/htdocs, using your favorite editor:

<? PHP Phpinfo ();? >

Save file modification and exit, use browser Browse such as: http://localhost/info.php, find rewrite, you should be able to find it in the page, description rewrite enabled.

Reference Links:

    1. Enable mod_rewrite on SuSE Linux
    2. Enable Apache mod_rewrite Module on OpenSuSE
    3. openSUSE configuration Apache rewrite allows access to the. htaccess file

Enable Apache Mod_rewrite in openSUSE

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.