[solved]Need Help. 500 Internal Server Error "Please Read"

Discussion in 'General' started by Mr. Spinnas, Jun 8, 2011.

  1. Mr. Spinnas

    Mr. Spinnas New Member

    I really not sure what is wrong. I really want to be fix if any one can give me an idea I will be glad and willing to give a small fee of a payment for your help.
    The site is (www.mymusicdynasty.com) I recently change to litespeed my server has 3 site but this Vbulletin site is the only one getting 500 internal server error randomly. I contacted my server support said they do not support litespeed and ca not assist me.

    My .Htaccess file


    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    Options +FollowSymLinks

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    RewriteBase /

    #RewriteCond %{HTTP_HOST} !^www\.mymusicdynasty\.com
    #RewriteRule (.*) http://www.mymusicdynasty.com/home/$1 [R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [QSA]

    RewriteCond %{HTTP_COOKIE} !bbimloggedin=yes
    RewriteCond %{HTTP_COOKIE} !bbuserid=
    RewriteCond %{HTTP_COOKIE} !bbpassword=
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
    RewriteCond %{QUERY_STRING} !product=vbnexus
    RewriteCond %{REQUEST_URI} !^/forum/(login|register|usercp|private|profile|cron|image)\.php$
    RewriteCond %{REQUEST_URI} !^/forum/admincp
    RewriteRule /forum/(.*\.php)?$
    Last edited by a moderator: Jun 9, 2011
  2. NiteWave

    NiteWave Administrator

  3. Mr. Spinnas

    Mr. Spinnas New Member

    Thanks, but do I have to enable Cache Policy?

    [​IMG]
    Last edited: Jun 8, 2011
  4. NiteWave

    NiteWave Administrator

    Yes. the above settings looks right.
  5. Mr. Spinnas

    Mr. Spinnas New Member

    I'm still getting the 500 error. Is that about right?

    .htaccess

    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    #Options +FollowSymLinks

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /

    #RewriteCond %{HTTP_HOST} !^www\.mymusicdynasty\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(MMD-admincp/|MMD-modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [QSA]

    RewriteCond %{HTTP_COOKIE} !vbseo_loggedin=yes
    RewriteCond %{HTTP_COOKIE} !bb_userid=
    RewriteCond %{HTTP_COOKIE} !bb_password=
    #RewriteCond %{ORG_REQ_URI} ^/(index\.php|)$
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule (.*) - [L,E=Cache-Control:max-age=60]
  6. webizen

    webizen New Member

    check error.log for more details of 500 error. also enable debug logging (Admin Console -> Configuration -> Server -> Log -> Log Level: Debug; Debug Level: High) to generate more info to help troubleshoot.
  7. NiteWave

    NiteWave Administrator

    the rewrite rules looks ok now --- vbseo cache is working. I've checked several URLs and confirmed working well, for example:
    http://mymusic....com/new-sumbit-videos/
    http://mymusic....com/home/

    however, URL ending with .php looks not cached, for example:
    http://mymusic....com/forum.php

    this may due to the rewrite rule
    Code:
    RewriteCond %{REQUEST_URI} !(MMD-admincp/|MMD-modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    which prevent caching .php pages.
    Update: remove "L" looks no problem, i.e, [L,QSA] --> [QSA], may be able to cache forum.php

    anyway this is a good progress.

    regarding 500 error, in addition to webizen's suggestion, I'd add another way to try:
    1.install (or Force Reinstall) latest 4.1.1
    2.rebuild lsphp (may not need this step, if after step 1, restart lsws, the issue gone)
    Last edited: Jun 8, 2011
  8. Mr. Spinnas

    Mr. Spinnas New Member

    Thank for the support. I did what you said now just waiting until the internal server error occurs
  9. Mr. Spinnas

    Mr. Spinnas New Member

    Do I check the error.log on ssh? or within the gui cause the error log on the gui not showing nothing
  10. webizen

    webizen New Member

    check from ssh and also make sure debug logging is enabled?
  11. NiteWave

    NiteWave Administrator

    just checked, http://mymusic....com/forum.php get cached as well.

    so this is another living example which lsws cache + vBulletin + vbseo working fine.

    2 concerns:
    1. since you store cache in /dev/shm/lsdiskcache, which is in main memory, need monitor the space cache used closely. if it occupy too many memory quickly, the whole system may not work properly since lack of free memory.

    2.now cache age is 60 seconds, may need change it depending on your server's load, traffic, free memory etc, to take best advantage of the page cache.
  12. Mr. Spinnas

    Mr. Spinnas New Member

    I did some reconfigure on the server everything seems to be working now i have this issue, but it still load well and show this error on the frontpage once i go to forum tab than home tab it show that. Is it a cookie problem?

    Your submission could not be processed because you have logged in since the previous page was loaded.


    Where should i store the cache instead? and how can i monitor it on shh? How many seconds should I put it 120? Thank for your help also I appreciate it
    Last edited: Jun 9, 2011
  13. NiteWave

    NiteWave Administrator

    I tried to click forum tab then home tab as a guest with fine. yes, may not reproduce the issue simply. when the issue arose, are you a logged in user?
    I'd assume you have done step 1. the cache plugin for vBulletin 3/4 described in http://www.litespeedtech.com/support/forum/showthread.php?t=4829 correctly.

    please refer http://blog.litespeedtech.com/2011/01/28/speed-up-vbulletin-sites-through-litespeed-built-in-cache/, step 6 Set a cron job to clean up cache
    #du -sh /dev/shm/lsdiskcache
    to check how much space used by cache.
    and please tell how much memory on the server:
    #free -m
  14. Mr. Spinnas

    Mr. Spinnas New Member

    Yea I am log on as a user. Im looking at the step now and checking the disk cache.

    [​IMG]


    I follow all the steps on http://www.litespeedtech.com/support...ead.php?t=4829 correctly. That the error i get when i am log on as user when i wait for a while go on forum tab than home i get that.

    7.3M /dev/shm/lsdiskcache

    total used free shared buffers cached
    Mem: 3955 2774 1181 0 160 2262
    -/+ buffers/cache: 351 3604
    Swap: 5951 0 5951
    Last edited: Jun 9, 2011
  15. NiteWave

    NiteWave Administrator

    ok. can you reproduce the issue as a guest ?

    and what's the output of
    #du -sh /dev/shm/lsdiskcache
    ?
    update: just saw it, now it's 7.3M out of 4G memory, should be ok at the time being. if it increase to 100M for example, may need set cache folder to disk like /tmp/diskcache etc.
    Last edited: Jun 9, 2011
  16. Mr. Spinnas

    Mr. Spinnas New Member

    No issue as guest.

    7.4M /dev/shm/lsdiskcache
  17. Mr. Spinnas

    Mr. Spinnas New Member

    My .htaccesss


    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    #Options +FollowSymLinks

    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /

    #RewriteCond %{HTTP_HOST} !^www\.mymusicdynasty\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

    RewriteCond %{REQUEST_URI} !(MMD-admincp/|MMD-modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [QSA]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [QSA]

    RewriteCond %{HTTP_COOKIE} !vbseo_loggedin=yes
    RewriteCond %{HTTP_COOKIE} !bb_userid=
    RewriteCond %{HTTP_COOKIE} !bb_password=
    #RewriteCond %{ORG_REQ_URI} ^/(index\.php|)$
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule (.*) - [L,E=Cache-Control:max-age=60]



    Should i change the admincp and modcp to the folder i rename it to?
  18. NiteWave

    NiteWave Administrator

    please try it and inform the result.
  19. Mr. Spinnas

    Mr. Spinnas New Member

    Alright I changed it. So is the 7.5M /dev/shm/lsdiskcache good?
  20. NiteWave

    NiteWave Administrator

    comparing with the total 4G memory, 7.5M should be ok

Share This Page