You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ou...@centrum.cz on 2002/01/29 21:09:20 UTC

SSI doesn't work (1.3.23)

Hello,

could anyone explain where is the problem ?

SSI Doesn't work in domain which is configured here:

<VirtualHost our_ip_here>
    ServerAdmin webmaster@domain.com
    DocumentRoot /domains/user_3743/domain.com
    ServerName www.domain.com
    ServerAlias *.domain.com domain.com
    ErrorLog /var/log/httpd/user_3743/domain.com.error.log
    CustomLog /var/log/httpd/user_3743/domain.com.transfer.log datra
    php_admin_value upload_tmp_dir /domains/user_3743/tmp
    php_admin_value open_basedir /domains/user_3743
    <directory />
    AllowOverride       All
    </directory>
    ScriptAlias /cgi/ "/domains/user_3743/domain.com/cgi/"
    Options Includes
    ErrorDocument       404     http://www.adulthostmasters.net/404.php
</VirtualHost>

and in the httpd.conf there is written this:

    AddType text/html .shtml
    AddHandler server-parsed .shtml


(at the end of httpd.conf there is Include domain.com.conf (where above
domain is described))

I have created test file in the root of that domain called test.shtml

Content of test.shtml
 A<BR>
<!--#include file="test.dat"-->
 C<BR>

Content of test.dat
THIS IS SSI TEST


But when I reach test.shtml in browser I see this:
A
C



Oops ? Where could be problem ?


Thanx,

R.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: mod-rewrite - moving a website ....

Posted by kirk Bailey <id...@netzero.net>.
Possibly I am confused.

You are moving to a new server, possibly a entirely new cohosting
site? Are you retaining the name? If so, and you retain the same
internal file names and links, no changes are needed. Make sure you
duplicate the tree with the www dir as the center of it, and all dir's
off it in the same relative locations, and names, and all files the
same names.

When someone at a search service clicks on http://www.mydomain.com,
the fact it is at a new cohost with an entirely new hard IP address is
irrelevant, ONCE THAT NEW ADDRESS PROPIGATES THROUGH NAME SERVER
SPACE. It will take the browser to the correct new machine.

DUPLICATE the site at the new server, and keep the old one running. At
the top of the home page, place some small indicator that the data
comes from the old site, and at the other server that it is coming
from the new site. FTP and telnet can go to hard IP addresses, so this
is not a big challenge.

When my cohosting service changed connectivity vendors, all the IP
addresses changed! I had to deal with this and maintain my email
service by doing ssh and ftp to the new IP address until the name
changes propigated. Such fun...

Hope this helps.

Jon Shoberg wrote:
> 
> I ahve a website which is heavily indexed by search engines.  They often do
> direct requests for documents and I would rather not have the web server
> send back tons of 404 pages.  THe website structure looked like ...
> 
> http://www.mydomain.com
> http://www.mydomain.com/index.html
> 
> http://www.mydomain.com/page1.html
> http://www.mydomain.com/page2.html
> ...
> http://www.mydomain.com/page(N).html
> 
> Is my understanding correct that mod_rewrite can take a request for
> /page1.html and internally make a request to
> /articles/viewdoc.php?v=page1.html such that it is transparent to the
> browser-agent?  Could someone provide a simple example of this?
> 
> Thanks
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
 

 -Respectfully,
              -Kirk D Bailey 
               Consulting Loose Cannon

end



  www.howlermonkey.net                 highprimate@howlermonkey.net
  www.sacredelectron.org                         idiot1@netzero.net
  www.tinylist.org                              grumpy@tinylist.org


----------------------------------------------------
Sign Up for NetZero Platinum Today
Only $9.95 per month!
http://my.netzero.net/s/signup?r=platinum&refcd=PT97

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: mod-rewrite - moving a website ....

Posted by Joshua Slive <jo...@slive.ca>.
> From: Jon Shoberg [mailto:jshoberg@cbd.net]

>
> This should do it ! Thanks :)
>
> I would like it applied to every static .html URL from the server root.
> This worked great, but is there a way to change it so it erwrites
> everything
> except the index.html page?  I presume apache uses perl5 style regexp ?

No, apache 1.3 uses egrep-style regexes.

To do that, I think you need
RewriteEngine On
RewriteCond %{REQUEST_URI} !index.html$
RewriteRule ^/([^/]*)\.html /articles/viewdoc.php?v=$1.html

Note I've changed the RewriteRule so it only applies to files in the
DocumentRoot, and not files in any subdirectory.  I'm still not sure if that
is what you want.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: mod-rewrite - moving a website ....

Posted by Jon Shoberg <js...@cbd.net>.
This should do it ! Thanks :)

I would like it applied to every static .html URL from the server root.
This worked great, but is there a way to change it so it erwrites everything
except the index.html page?  I presume apache uses perl5 style regexp ?

Thanks



-----Original Message-----
From: Joshua Slive [mailto:joshua@slive.ca]
Sent: Sunday, February 03, 2002 11:15 PM
To: users@httpd.apache.org
Subject: RE: mod-rewrite - moving a website ....



> From: Jon Shoberg [mailto:jshoberg@cbd.net]


> Is my understanding correct that mod_rewrite can take a request for
> /page1.html and internally make a request to
> /articles/viewdoc.php?v=page1.html such that it is transparent to the
> browser-agent?  Could someone provide a simple example of this?

Yep.  Something along the lines
RewriteEngine On
RewriteRule ^/(.*)\.html /articles/viewdoc.php?v=$1.html

You don't mention exactly which pages you want this rule to apply to.  I've
written it so that it will apply to ever .html on the site.

Use the RewriteLog to help you find tune things.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: mod-rewrite - moving a website ....

Posted by Joshua Slive <jo...@slive.ca>.
> From: Jon Shoberg [mailto:jshoberg@cbd.net]


> Is my understanding correct that mod_rewrite can take a request for
> /page1.html and internally make a request to
> /articles/viewdoc.php?v=page1.html such that it is transparent to the
> browser-agent?  Could someone provide a simple example of this?

Yep.  Something along the lines
RewriteEngine On
RewriteRule ^/(.*)\.html /articles/viewdoc.php?v=$1.html

You don't mention exactly which pages you want this rule to apply to.  I've
written it so that it will apply to ever .html on the site.

Use the RewriteLog to help you find tune things.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


mod-rewrite - moving a website ....

Posted by Jon Shoberg <js...@cbd.net>.
I ahve a website which is heavily indexed by search engines.  They often do
direct requests for documents and I would rather not have the web server
send back tons of 404 pages.  THe website structure looked like ...

http://www.mydomain.com
http://www.mydomain.com/index.html

http://www.mydomain.com/page1.html
http://www.mydomain.com/page2.html
...
http://www.mydomain.com/page(N).html

Is my understanding correct that mod_rewrite can take a request for
/page1.html and internally make a request to
/articles/viewdoc.php?v=page1.html such that it is transparent to the
browser-agent?  Could someone provide a simple example of this?

Thanks



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: SSI doesn't work (1.3.23)

Posted by Joshua Slive <jo...@slive.ca>.
> From: outbound@centrum.cz [mailto:outbound@centrum.cz]

>
> But <directory /> means whole fs starting at DocumentRoot of that
> VirtualHost.
> Or <Directory /> means filesystem's /  ??

<Directory> always refers to the filesystem, so <Directory /> always refers
to the filesystem root.  <Location> refers to the webspace (ie, the
documentroot).

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: SSI doesn't work (1.3.23)

Posted by ou...@centrum.cz.
> > Hello,
> > > <VirtualHost our_ip_here>
> > ...
> > > </VirtualHost>
> > > <Directory />
> > >     AllowOverride       All
> > >     Options Includes
> > > </Directory>
> > >
> By the way,  what he means is that you have your ENTIRE FILE SYSTEM
> available to the public on your web server.

No really no !

But <directory /> means whole fs starting at DocumentRoot of that
VirtualHost.
Or <Directory /> means filesystem's /  ??


Roman



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: SSI doesn't work (1.3.23)

Posted by Lewis Watson <li...@visionsix.com>.
----- Original Message -----
From: <ou...@centrum.cz>
To: <us...@httpd.apache.org>
Sent: Tuesday, January 29, 2002 4:27 PM
Subject: RE: SSI doesn't work (1.3.23)


> Hello,
> > <VirtualHost our_ip_here>
> ...
> > </VirtualHost>
> > <Directory />
> >     AllowOverride       All
> >     Options Includes
> > </Directory>
> >
> > BTW, is the root of the server's file system ("/") truly
> > a web directory? This is not good. Should do something else
> > like /usr/home/domain/ or /www/httpd_docs/ or anything other
> > than root.
>
> What do you mean root of server's fs ?
>
> we have /domains as DocumentRoot and is redefined by each <VirtualHost
...>
>
> Btw Why I should to insert Options Includes outside of <VirtualHost>
> directive ???
>
> R.


R:
If this machine is important to you I would  run, not walk, to this url:

http://httpd.apache.org/docs/misc/security_tips.html

By the way,  what he means is that you have your ENTIRE FILE SYSTEM
available to the public on your web server.

Lewis Watson






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: SSI doesn't work (1.3.23)

Posted by ou...@centrum.cz.
Hello,
> <VirtualHost our_ip_here>
...
> </VirtualHost>
> <Directory />
>     AllowOverride       All
>     Options Includes
> </Directory>
>
> BTW, is the root of the server's file system ("/") truly
> a web directory? This is not good. Should do something else
> like /usr/home/domain/ or /www/httpd_docs/ or anything other
> than root.

What do you mean root of server's fs ?

we have /domains as DocumentRoot and is redefined by each <VirtualHost ...>

Btw Why I should to insert Options Includes outside of <VirtualHost>
directive ???

R.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: SSI doesn't work (1.3.23)

Posted by RuneImp <ru...@imptech.net>.
Try this instead:

<VirtualHost our_ip_here>
    ServerAdmin webmaster@domain.com
    DocumentRoot /domains/user_3743/domain.com
    ServerName www.domain.com
    ServerAlias *.domain.com domain.com
    ErrorLog /var/log/httpd/user_3743/domain.com.error.log
    CustomLog /var/log/httpd/user_3743/domain.com.transfer.log datra
    php_admin_value upload_tmp_dir /domains/user_3743/tmp
    php_admin_value open_basedir /domains/user_3743
    ScriptAlias /cgi/ "/domains/user_3743/domain.com/cgi/"
    ErrorDocument       404     http://www.adulthostmasters.net/404.php
</VirtualHost>
<Directory />
    AllowOverride       All
    Options Includes
</Directory>

BTW, is the root of the server's file system ("/") truly
a web directory? This is not good. Should do something else
like /usr/home/domain/ or /www/httpd_docs/ or anything other
than root.


-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech
http://imptech.net
rune@imptech.net


----- Original Message ----- 
From: <ou...@centrum.cz>
To: <us...@httpd.apache.org>
Sent: Tuesday, January 29, 2002 12:09 PM
Subject: SSI doesn't work (1.3.23)


Hello,

could anyone explain where is the problem ?

SSI Doesn't work in domain which is configured here:

<VirtualHost our_ip_here>
    ServerAdmin webmaster@domain.com
    DocumentRoot /domains/user_3743/domain.com
    ServerName www.domain.com
    ServerAlias *.domain.com domain.com
    ErrorLog /var/log/httpd/user_3743/domain.com.error.log
    CustomLog /var/log/httpd/user_3743/domain.com.transfer.log datra
    php_admin_value upload_tmp_dir /domains/user_3743/tmp
    php_admin_value open_basedir /domains/user_3743
    <directory />
    AllowOverride       All
    </directory>
    ScriptAlias /cgi/ "/domains/user_3743/domain.com/cgi/"
    Options Includes
    ErrorDocument       404     http://www.adulthostmasters.net/404.php
</VirtualHost>

and in the httpd.conf there is written this:

    AddType text/html .shtml
    AddHandler server-parsed .shtml


(at the end of httpd.conf there is Include domain.com.conf (where above
domain is described))

I have created test file in the root of that domain called test.shtml

Content of test.shtml
 A<BR>
<!--#include file="test.dat"-->
 C<BR>

Content of test.dat
THIS IS SSI TEST


But when I reach test.shtml in browser I see this:
A
C



Oops ? Where could be problem ?


Thanx,

R.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org