LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-22-2018, 05:45 AM   #1
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Rep: Reputation: Disabled
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?
 
Old 02-22-2018, 06:05 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
But when I ran this command LoadModule rewrite_module modules/mod_rewrite.so
not results seems to be showing.
There is no such command. The whole "LoadModule rewrite_module modules/mod_rewrite.so" is supposed to be into the apache config files.

To verify is the module is loaded, you can run:
Code:
/usr/sbin/httpd -M|grep rewrite
 
Old 02-22-2018, 06:14 AM   #3
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
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)
 
Old 02-22-2018, 06:46 AM   #4
Hostech_Support
Member
 
Registered: Oct 2017
Location: India
Posts: 41

Rep: Reputation: Disabled
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?
 
Old 02-22-2018, 06:49 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
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

Regards
 
Old 02-22-2018, 06:49 AM   #6
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Hi Hostech,
Yes I have tried is the same still. What else can I change ?
 
Old 02-22-2018, 07:11 AM   #7
Hostech_Support
Member
 
Registered: Oct 2017
Location: India
Posts: 41

Rep: Reputation: Disabled
Quote:
Originally Posted by newbie14 View Post
Hi Hostech,
Yes I have tried is the same still. What else can I change ?
>> As suggested by bathory you can try adding ServerName directive and Restart apache.
 
Old 02-22-2018, 07:45 AM   #8
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
I dont have a registered name is that ok? Is just an ip based only ? What name can I give it ?
 
Old 02-22-2018, 07:47 AM   #9
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
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?
 
Old 02-22-2018, 08:04 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by newbie14 View Post
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 View Post
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

Regards
 
Old 02-22-2018, 08:40 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,665
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache HTTP + Apache Tomcat + mod_rewrite setevoy Linux - Server 1 08-21-2015 08:44 AM
SoundCard loaded and showing, sound however still does not work kwsnow Linux - Hardware 31 04-28-2010 12:44 AM
Wireless Card seems to be loaded but is not showing interface stu_mueller Slackware 3 06-09-2007 07:28 AM
How to enable Apache mod_rewrite, after apache installed without this modue jCash Linux - Newbie 1 10-24-2006 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration