Apache working with Litespeed?

Discussion in 'Apache Migration/Compatibility' started by surfman, Dec 28, 2006.

  1. surfman

    surfman New Member

    removing "NameVirtualHost my.ip.addre.ss:78" still does not help.

    My concern is if the problem is like what you said:

    why it did work for several hours, just like what I mentioned at post #16?

    May be, Is there anyway to make sure LSWS sends Apache Host header with "www.mydomain.com:78" instead of "www.mydomain.com:78"? Thanks.
  2. surfman

    surfman New Member

    I checked the apache error log, found all shtml files were sent to be like these:

    PHP:
    [Sat Dec 30 09:52:27 2006] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/news/localnews/1475.shtml
    [Sat Dec 30 09:52:27 2006] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/404.shtml
    [Sat Dec 30 09:52:29 2006] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/news/localnews/index-13.shtml
    [Sat Dec 30 09:52:29 2006] [error] [client 127.0.0.1File does not exist: /usr/local/apache/htdocs/404.shtml
    all shtml files were sent to:

    /usr/local/apache/htdocs/news/localnews/1475.shtml

    rather than

    /home/myusername/public_html/localnews/1475.shtml

    all my shtml pages are stored at folder

    /home/myusername/public_html

    NOT

    /usr/local/apache/htdocs

    I guess that's why http://www.mydomain.com is not working while http://www.mydomain.com:78 is working.

    I checked with apache settings,

    <VirtualHost my.ip.addre.ss>
    ServerAlias mydomain.net
    ServerAdmin webmaster@mydomain.net
    DocumentRoot /home/myusername/public_html
    BytesLog domlogs/mydomain.net-bytes_log
    ServerName www.mydomain.net

    User myusername
    Group myusername
    CustomLog /usr/local/apache/domlogs/mydomain.net combined
    ScriptAlias /cgi-bin/ /home/myusername/public_html/cgi-bin/
    </VirtualHost>


    the red line for my DocumentRoot is correct. why apache still looks for shtml at the folder /usr/local/apache/htdocs ?

    how can I correct this issue? thanks.
    Last edited: Dec 31, 2006
  3. mistwang

    mistwang LiteSpeed Staff

    I don't know what make it work for serval hours, what you have done to apache configuration during the few hours? ;)

    Let's see what we can do with the Host header. :)

    That's because for some reason apache serve http://www.mydomain.com with the default vhost, serve http://www.mydomain.com:78 with the vhost you defined.

    Looks like the best way to fix it is to change the host header by appending ":78" to the domain name in LSWS.
  4. mistwang

    mistwang LiteSpeed Staff

    OK, I find the cure. :)
    You need to change "Port 80" to "Port 78" in your httpd.conf.
    Last edited: Jan 2, 2007

Share This Page