You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by david hawcroft <ab...@yahoo.com> on 2002/11/03 05:11:54 UTC

[users@httpd] Significance of Server Name and cgi-bin problem (maybe)

 I have three little questions:

1. The Server Name entry in the config file.
I run my Apache server on my client machine on a little Lan. Just for
my own amusement and education.

But now I've expanded a bit and got a dynamic dns service to provide
me with a permanent IP, and got the Lan manager to configure his
Sygate server to let traffic in - and now I'm viewable by the world.

Very good. I can begin to see what you guys are talking about.. code
red attacks in the access log and so on... beaut. 

So I look in the config file and I see where it says 'Server Name'
and tells you to provide a real name but it's okay to use 127.0.0.1
if you are just local for your own use.  

Well.. I was, but now I'm sort of not... but I don't have a fixed IP
I can write in there and I don't a name I can write in. Everything is
still working fine.

What is the full significance of this 'server name'? Is it okay to
leave it as localhost?

2. index.html or index.htm?
I am trying to use Frontpage. When I create a new web in Frontpage
and import my existing site it will export it back again with
index.htm as the home page! Maybe there's a way around this but I
haven't found it yet.
Apache seems to need index.html as a home page.
Can I change Apache so's it'll open index.htm when index.html is not
there?

3. a perl script 'downloaded'.
So I can have the world view a stable site but have a site for me to
experiment with I have copied my site down one level on the Apache
directory tree and called it 'experiments'.  So it is at c:/program
files/apache group/apache/htdocs/experiments.

So now frontpage happily has two 'webs' I can use - one gets
published to htdocs and is the one the world sees and one gets
published to htdocs/experiments and is the one I play most with.

And I can access my play site by simply writing the usual url and
appending "/experiments/index.htm" on the end.

I need to view the site like this because frontpage preview won't run
the perl scripts.. but then....

 When I click on the link that fires a perl script in the
'experiments' site it doesn't run. Instead I get a message saying I
am downloading 'webimage.pl' from the root site, if you know what I
mean. i.e. it gives me an url and it is the url of the original site,
the original homepage. It asks me what I want to do: save to disk or
open it. Just like a normal download.

I thought any page anywhere will look for any cgi script in
apache/cgi-bin ?  That's where the 'root' index.htm looks for it. And
that index.htm is located at, of course, apache/htdocs/index.htm

The entry in the index.htm files is the same for both:
"/cgi-bin/webimage.pl"

I've just realised I haven't tried hardcoding the full path for the
script. I should have tried that before writing this: ah, well,
there's still two valid questions and if hardcoding doesn't fix it
this remains a valid question...

 any help much appreciated.  regards.. abrogard




__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Significance of Server Name and cgi-bin problem (maybe)

Posted by "J. Greenlees" <ja...@shaw.ca>.

david hawcroft wrote:

> I have three little questions:
>

>~snip~
>

>What is the full significance of this 'server name'? Is it okay to
>leave it as localhost?
>  
>
you can leave as localhost, but it would help you offer links to people 
to see it if you could either put a name or static ip number in there.
like if I type localhost in a url, I'm not going anywhere but my own 
machine. ~G~

>2. index.html or index.htm?
>
>Apache seems to need index.html as a home page.
>Can I change Apache so's it'll open index.htm when index.html is not
>there?
>  
>
in your http.conf, you can set the indexes to have whatever extension 
you want.
it should, by default be *.htm ; *.html
check your conf for the indexes and you will see what extensions it 
recognizes, and can add whatever extension you want. you can also make 
it look for content.html, start.html, whatever file you want to use as 
your initial site file.

>3. a perl script 'downloaded'.
>So I can have the world view a stable site but have a site for me to
>experiment with I have copied my site down one level on the Apache
>directory tree and called it 'experiments'.  So it is at c:/program
>files/apache group/apache/htdocs/experiments.
>
>So now frontpage happily has two 'webs' I can use - one gets
>published to htdocs and is the one the world sees and one gets
>published to htdocs/experiments and is the one I play most with.
>
>And I can access my play site by simply writing the usual url and
>appending "/experiments/index.htm" on the end.
>
>I need to view the site like this because frontpage preview won't run
>the perl scripts.. but then....
>
> When I click on the link that fires a perl script in the
>'experiments' site it doesn't run. Instead I get a message saying I
>am downloading 'webimage.pl' from the root site, if you know what I
>mean. i.e. it gives me an url and it is the url of the original site,
>the original homepage. It asks me what I want to do: save to disk or
>open it. Just like a normal download.
>
>I thought any page anywhere will look for any cgi script in
>apache/cgi-bin ?  That's where the 'root' index.htm looks for it. And
>that index.htm is located at, of course, apache/htdocs/index.htm
>
>The entry in the index.htm files is the same for both:
>"/cgi-bin/webimage.pl"
>
>I've just realised I haven't tried hardcoding the full path for the
>script. I should have tried that before writing this: ah, well,
>there's still two valid questions and if hardcoding doesn't fix it
>this remains a valid question...
>
> any help much appreciated.  regards.. abrogard
>
>
>
>ya got me on the perl, I never use perlscripts so haven't played with the configuration of mod_perl.
>



---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org