Need help with server administration?
RSS icon Email icon Home icon
  • .htaccess RewriteCond&RewriteRule problems

    Posted on May 26th, 2009 servbit1 No comments

    hello experts,
    my website http://www.cashflow24hours.com has some url broken (http://www.cashflow24hours.com/blogs; http://www.cashflow24hours.com/authors; http://www.cashflow24hours.com/authors/register; http://www.cashflow24hours.com/authors/login; http://www.cashflow24hours.com/search/advanced)

    if i’m typing “http://www.cashflow24hours.com/blogs/” will success load the page, however if i’,m typing “http://www.cashflow24hours.com/blogs” the results is The page cannot be found. i’ve research more about this software (articlelive nx 1.7 www.interspire.com) and i want to know what is the problems, after looking for forum and this is not code/programming error, this is from mod_rewrite .htaccess RewriteCond&RewriteRule.

    my .htaccess :
    ==================================
    RewriteCond %{REQUEST_URI} !blogs\.php
    RewriteRule ^blogs(.*)$ /blogs.php?$1 [L]
    ================================
    nb:
    - my hosting already mod_rewrite enable
    - already :
    *RewriteEngine On
    *RewriteBase /
    *Options +FollowSymlinks

    need an experts adviced to help me find the solutions.thank you very much

    it looks like your htaccess file is not in your webroot dir where it should be (but rather in your blogs dir).
    If this is the case, putting the .htaccess fiel in webroot dir will solve your issue.

  • Appropiate Configuration for Startup and Standby Servers

    Posted on May 26th, 2009 servbit1 No comments

    I have been having an issue with my apache server at random times stop responding. I would restart it and it would be on its merry way. After the last time I turned up logging on the production machine and kept an eye on it, once it happened again I went into the error logs and picked up this gem.

    “[Wed Apr 01 19:07:38 2009] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 7 idle, and 48 total children”

    there were several of these and then a few more lines of “[Wed Apr 01 19:07:38 2009] [debug] proxy_util.c(1778): proxy: initialized single connection worker 0 in child 21005 for (*)” and then nothing until I restarted. From the looks of it I should up the StartServers and Min/MaxSpareServers, but this is where I dont really understand a whole lot about the httpd.conf file and what to set, so if someone could look over my settings and information and point me in the right direction or even just tell my dense headed self I would appreciate it .. oh and shower you with Points. :D

    httpd.conf
    # prefork MPM
    # StartServers: number of server processes to start
    # MinSpareServers: minimum number of server processes which are kept spare
    # MaxSpareServers: maximum number of server processes which are kept spare
    # ServerLimit: maximum value for MaxClients for the lifetime of the server
    # MaxClients: maximum number of server processes allowed to start
    # MaxRequestsPerChild: maximum number of requests a server process serves

    StartServers 16
    MinSpareServers 10
    MaxSpareServers 20
    ServerLimit 512
    MaxClients 512
    MaxRequestsPerChild 4000

    # worker MPM
    # StartServers: initial number of server processes to start
    # MaxClients: maximum number of simultaneous client connections
    # MinSpareThreads: minimum number of worker threads which are kept spare
    # MaxSpareThreads: maximum number of worker threads which are kept spare
    # ThreadsPerChild: constant number of worker threads in each server process
    # MaxRequestsPerChild: maximum number of requests a server process serves

    StartServers 2
    MaxClients 150
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxRequestsPerChild 0

    #free -mt
    total used free shared buffers cached
    Mem: 998 967 31 0 173 560
    -/+ buffers/cache: 233 765
    Swap: 2008 28 1979
    Total: 3006 995 2011

    #/sbin/swapon -s
    Filename Type Size Used Priority
    /dev/sda5 partition 2056280 28876 -1

    #/usr/sbin/httpd -v
    Server version: Apache/2.2.8 (Unix)

    # /usr/sbin/httpd -l
    Compiled in modules:
    core.c
    prefork.c
    http_core.c
    mod_so.c

    You can use Monit to monitor httpd service it will alert you if there is any problem and will restart the server

    http://www.howtoforge.com/server-monitoring-with-munin-and-monit-on-centos-5.2

    omm i dont think its memory, as the log said , you need to increate the prefork beause you are runnign out

    so when this problem happen, try to incrase your prefork setting , see if that help

    but your free ram is low… when this problem happended, check the Ram and processor utilization, just check if they are not running out …

  • i got some errors after redirect

    Posted on May 26th, 2009 servbit1 No comments

    before using this redirect rule i was able to edit my site with front page
    and also i got error syntax error prototype.js after using redirect
    this is my new .htaccess file in the public_html directory

    RewriteEngine on

    # -FrontPage-

    AuthUserFile /home6/attejara/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home6/attejara/public_html/_vti_pvt/service.grp

    order deny,allow
    deny from all
    allow from all

    order deny,allow
    deny from all

    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php

    AuthName attejara.com
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    RewriteCond %{HTTP_HOST} ^attejara.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.attejara.com$
    RewriteRule ^.*$ “http\:\/\/www\.attejara\.com\/ms\/index\.php” [R=301,L]

    Your rewrite rule says “if the host is attejara.com or the host is www.attejara.com, redirect EVERY REQUEST to http://www.attejara.com/ms/index.php”. If you are storing javascript files on the attejara.com domain, then yes, those get redirected, too.

    try adding this line
    RewriteRule ^([^.]*)/?$ index.php [L]

  • Apache services

    Posted on May 26th, 2009 servbit1 No comments

    Hello,

    We have a windows server 2003 x64 service pack 2 running apache 2.2 for a Drupal site. The site is constantly down and we have to restart the apache services to get the site up. Attached are the error messages that we are getting.

    The original error is saying that the program httpd.exe was executing php5ts.dll and that dll had a problem.

    However in your event viewer you are showing other errors, one of which that could be causing all of the other problems.

    How much RAM do you have on this server?
    What is the size of the page file?

    It looks like you are running out of of virtual memory (RAM+page file size=virtual memory). I would start by increasing the page file size, but make sure you have enough disk space to increase it. If you don’t have enough disk space, you will just have the same problem.
    Not what you’re looking for? Ask an Expert.

  • can you create a server enviroment locally with apache?

    Posted on May 26th, 2009 servbit1 No comments

    hi,
    i have a flash projector file with some image sequences that i need to run locally on a pc for a display. i need to have it preload before it starts and as i understand flash needs a server enviroment to do so. is there a way to do this?

    Yes. Try this link http://httpd.apache.org/docs/1.3/install.html
    And also http://www.flashcentral.com/Tech/Server/Apache.htm for more about flash and apache