Centos 7 Apache mod_rewrite not showing to be loaded.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Centos 7 Apache mod_rewrite not showing to be loaded.
I have centos machine. Thus I go into the into this folder /etc/httpd/conf.modules.d and saw the 00-base.conf. I saw this line
LoadModule rewrite_module modules/mod_rewrite.so not commented. Thus I assume its part of loaded module.
But when I ran this command LoadModule rewrite_module modules/mod_rewrite.so
not results seems to be showing.
In the main httpd.conf I saw this line is also not commented
IncludeOptional conf.d/*.conf.
What else could be the reason this module is not loading?
Hi Bathory.
I got this based on your suggested command. I guess this means is loaded right ?
Quote:
/usr/sbin/httpd -M|grep rewrite
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
rewrite_module (shared)
Have you tried editing the /etc/httpd/conf/httpd.conf file? make sure that the AllowOverride flag for the <Directory "/var/www/html"> block is changed from None to All?
I got this based on your suggested command. I guess this means is loaded right ?
/usr/sbin/httpd -M|grep rewrite
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
rewrite_module (shared)
Yes. It's loaded.
If you want to get rid of the warning about the "fully qualified domain name", just assign one in the ServerName directive
Hi Bathory.
Where is the correct place to add this name and how it will effect ? So in future when I have proper domain name where will that be assigned?
I dont have a registered name is that ok? Is just an ip based only ? What name can I give it ?
Quote:
Originally Posted by newbie14
Hi Bathory.
Where is the correct place to add this name and how it will effect ? So in future when I have proper domain name where will that be assigned?
This is just a warning, not an error, so apache will start without problems.
If you don't want to see that again, add in main httpd.conf something like:
Code:
ServerName localhost.localdomain
In the future you can replace localhost.localdomain above with the actual hostname you've registered
Since Apache has many (heh ...) modules, many of them are separately packaged. (PHP has been done the same way ... it's not "one gigantic executable" anymore.)
On Ubuntu, for instance, try: apt-cache search apache.
Distros also have a certain way of enabling or disabling Apache modules. On Ubuntu, check out commands like: a2dismod / a2enmod. These things are documented ... ... so, read the directions for your distro very carefully.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.