The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod_rewrite in http.conf

Discussion in 'General Discussion' started by mikjag, Nov 15, 2011.

  1. mikjag

    mikjag Registered

    Joined:
    Nov 15, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I'm trying, and I'm quickly losing my patience with cPanel. Why in God's name did I go with cPanel if I can do this manually . . .

    Anyway, I can't get mod_rewrite working in my httpd.conf. No matter how I add it, Apache refuses to start back up.

    Via another post on cPanel I added what they mentioned and bam, apache dies. Take it back out, apache loads.
     
  2. *Daniel

    *Daniel Member

    Joined:
    Mar 11, 2010
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    What errors are you getting?
     
  3. mikjag

    mikjag Registered

    Joined:
    Nov 15, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Apache restart failed. Unable to load pid from pid file and no httpd process found in process list.

    If apache restart reported success but it failed soon after, it may be caused by oddities with mod_ssl.

    You should run /usr/local/cpanel/scripts/ssl_crt_status as part of your troubleshooting process. Pass it --help for more details.

    Also be sure to examine apache's various log files.
    Apache Restart Output:

    Log:
    File does not exist: /home/XXXXXX/public_html/Reviews
    SoftException in Application.cpp:256: File "/home/XXXXXX/public_html/wp-admin/options-permalink.php" is writeable by group, referer: http://XXXXXX.com/wp-admin/
    Premature end of script headers: options-permalink.php, referer: http://XXXXXX.com/wp-admin/
    File does not exist: /home/XXXXXX/public_html/500.shtml, referer: http://XXXXXX.com/wp-admin/
    SoftException in Application.cpp:256: File "/home/XXXXXX/public_html/wp-admin/options-permalink.php" is writeable by group, referer: http://ipkonfig.com/wp-admin/index.php
    Premature end of script headers: options-permalink.php, referer: http://XXXXXX.com/wp-admin/index.php
    File does not exist: /home/XXXXXX/public_html/500.shtml, referer: http://XXXXXX.com/wp-admin/index.php
    File does not exist: /home/XXXXXX/public_html/RSSNews.xml
    File does not exist: /home/XXXXXX/public_html/RSSNews.xml
    File does not exist: /home/XXXXXX/public_html/RSSNews.xml
    caught SIGTERM, shutting down

    My .htaccess is in that wp-admin folder is:

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/wp-admin
    RewriteCond %{HTTP_COOKIE} !WordPressAdminSession=XXXXXXXXX
    RewriteRule .* - [L,F]

    # BEGIN WordPress
    # Block the include-only files.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]

    # END WordPress

    My problem is my Permalinks in Wordpress gives me an internal server error and folks in the forums said mod_rewrite needs to be enabled. Well, I end up with more problems then.

    options-permalink.php <-- is the file I need working, but trying to enable this doesn't seem to be working out so well.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I'm sorry you have had a bad experience with cPanel thus far. Let's see if we can help you resolve this issue.

    First, I want to point out that Mod_Rewrite is enabled by default with cPanel. You can confirm this by running the following command:

    Code:
    # /usr/local/apache/bin/httpd -l|grep rewrite
    The output should look like this if it's enabled:

    Code:
    [~]# /usr/local/apache/bin/httpd -l|grep rewrite
      mod_rewrite.c
    I suggest reverting any changes you made to the Apache configuration file. Once you do that, we can move on to the actual "500" error message you reported having. When you receive that error, check the Apache error log to see what shows up:

    Code:
    /usr/local/apache/logs/error_log
    Paste the relevant error here (just the one or two lines that are related to the website), and we can provide further advice.

    Thank you.
     
Loading...

Share This Page