By dabellator on
Hello everyone!
I've installed a Drupal site on a VPS for the first time. I'm using CloudLinux 5.5 x64 with cpanel and whm. Trouble is, I can't seem to get clean urls enabled. I've checked my httpd file and I don't seem to have the two required lines for mod_rewrite, although I do have a line that says rewrite engine on. When I've placed the required lines into the file, Apache returns a "missing file" error.
Please let me know if you need additional information to help me troubleshoot, and if this question has been answered elsewhere feel free to just point me in that direction. Thanks!
-JB
Comments
mod rewrite is a module which
mod rewrite is a module which must be compiled in or loaded when Apache starts. It must be installed and the path to the extensions folder where it lives (if it is not complied in) must be included as far as I can remember. So look at the path in the config file where the modules are, then go to that folder and check whether the file mod_rewrite.c is there. If not, put it there, and restart Apache.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Thanks for the help! I
Thanks for the help! I really appreciate it, and you got me one step closer to solving my issue. As I look through the httpd.conf file I'm not finding where the modules are being loaded from. It does have a message that says the httpd.conf file is automatically generated from certain scripts in my cpanel/apache2 folder.
Can you offer any more advice on finding where to place the mod_rewrite file, or how to automatically load it through cpanel into apache? Thanks again for your input.
-JB
I'm wondering if this is
I'm wondering if this is truly my issue. When I run the command:
httpd -l | grep -i rewriteit returns:
mod_rewrite.cshouldn't than mean that it is installed?
-JB
It means it should be
It means it should be installed and loaded. Therefore tracking it down should be unnecessary. (With cPanel you cannot manually edit httpd.conf as it is automatically written, you edit post and pre httpd.conf files. But apparently not relevant as you have mod_rewrite.) Therefore the clean URLs problem is different. I don't know what. Often running cron sorts these problems out. Otherwise, I cannot think of what to try.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
New discovery: it seems I
New discovery: it seems I don't have the specific rules spelled out for the server to follow. I'm referring to the code:
In the clean URLs info page. Trouble is, I'm not sure what I need to fill in specifically for my site. My site does read the .htaccess file, so since I cannot directly edit my httpd.conf I will use .htaccess. Any advice on what needs to be filled in?
Again, thanks for you help, you are really teaching a newbie here.
-JB
...and with that I solved my
...and with that I solved my own issue. I double check with another site I have running and it seems the proper .htaccess file did not get copied. I used the proper file and not so amazingly all is well again.
global copying or global or
global copying or global or moving in linux with e.g
cp -r * always omits hidden files which begin with a dot. Copying .htaccess is often overlooked. This is a top cause of the simpler type of problems on this forum.
Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors