Apache Web Serving with Jaguar, Part 2
Pages: 1, 2
In a default installation of Apache on Mac OS X, CGI scripts are only allowed within /Library/Webserver/CGI-Executables/. Uncommenting the above line (removing the # character) allows CGI scripts to be executed from any user directory, such as /Users/morbus/Sites. In our case, because we aren't using the User directories (because they create ugly URLs for GatesMcFarlaneCo's intranet), we're going to leave the line commented.
If CGI access is turned on already (as per the AddModule and LoadModule lines at the beginning of our article), we should be able to reach one of the pre-installed scripts and see a happy result, right? Try http://127.0.0.1/cgi-bin/test-cgi (yes, test-cgi not test.cgi). You were probably greeted by a not-so-joyous response: "FORBIDDEN," Apache screams. "You don't have permission to access!"
Huh? Why didn't this work? Now is a perfect time to prove how useful the Apache web server logs can be. If you recall our discussion about httpd -V above, you'll remember that Apache's access log is located at /var/log/httpd/access_log. Let's look at the very last line of that file, easily reached with tail:
tail /var/log/httpd/access_log
You'll see that the last line looks similar to:
127.0.0.1 - - [19/Feb/2003:20:26:22 -0500]
"GET /cgi-bin/test-cgi HTTP/1.1" 403 292
Quickly, this line shows where this particular request came from (127.0.0.1), the time the file was requested, the protocol used (HTTP/1.1), the response code (403), and the size of the response (292 bytes). This is all fine and dandy, but doesn't tell us what went wrong. For this, we'll dip into our error log (pinpointed by the httpd -V command):
tail /var/log/httpd/error_log
.
.
[Wed Feb 19 20:26:22 2003] [error] [client 127.0.0.1]
file permissions deny server execution:
/Library/WebServer/CGI-Executables/test-cgi
Bingo! This tells us exactly what went wrong--the file permissions were incorrect. For Apache to run a CGI script, the script in question needs to have "execute" permissions. To give the test-cgi file the correct permissions, do the following in the Terminal:
cd /Library/WebServer/CGI-Executables
sudo chmod 755 test-cgi
After running the above (you'll be asked for an administrator's password), load the URL again, and you should be happily greeted with gobs of environment information. (To learn more about permissions and the chmod and sudo, consult your favorite search engine, friendly geek, or O'Reilly-stocked library.)
With the basics of CGI out of the way, you can now install CGI-based applications to complement your intranet. Need a content management system for the GatesMcFarlaneCo developers to keep everyone up to date on their coding progress? Try the ever popular Movable Type.
Turning On Server-Side Includes
Server-side includes, better known as SSIs, allow you to include content from other files or scripts into the page currently being served. This is done by Apache before the page is actually shown to the user--a visitor will never know what you've included or where.
Commonly, SSIs are used to include things such as headers, footers, and "what's new" features across an entire site. When you need to change your site logo's height and width, for instance, you can change the header include only, and the changes will be reflected immediately wherever you've included that file.
SSIs, by default, are turned off. To turn them on, we're going to use the same "search for the feature" trick we did above. Open your Apache configuration file, and search for "server side." Our only match is near the previously seen AddHandler for CGI scripts:
# To use server-parsed HTML files
#
# AddType text/html .shtml
# AddHandler server-parsed .shtml
Happily, this is exactly what we're looking for. Those simple Add lines tell us a lot. They establish a pattern based on what we already know about CGI. If you recall, we could have turned on the CGI feature for files ending in .cgi--in other words, any file you created with the .cgi extension (whether it was a CGI program or not), would be treated as an executable script.
Likewise, these lines are telling us that we can turn on the server-side include feature for files ending in .shtml. Whether we actually use the SSI feature in these files doesn't matter--they'd still be treated and processed as if they did.
This is important. You may be thinking "If SSIs are so great, why not enable them for .html filenames?" Ultimately, it's a matter of speed. If you have 3,000 .html files, and only 1,000 of them actually use SSI, Apache will still look for SSI instructions in the other 2,000. That's a waste of resources. Granted, processing SSI incurs very little overhead, but if you're being hit 50,000 times a second, it can certainly add up. This isn't too worrisome for our GatesMcFarlaneCo intranet, but is good to know for your future Apache projects.
For now, uncomment the AddType and AddHandler lines. This will turn on the SSI mojo power. But where? When we were learning about CGI, we saw a configuration setting that said our CGIs lived in /Library/Webserver/CGI-Executables/--we now have to tell Apache where to enable our server-side includes.
Because we've building an intranet that's going to live in /Library/Webserver/Documents (Apache's DocumentRoot), that's where we want our SSI capability to be active. Go to the top of your Apache configuration file and search for "/Library/Webserver/Documents/". The second result looks like the following (we've removed the commented lines from this example):
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
You'll notice that this looks similar to the <Directory> entry we saw when we were looking into CGI. As before, we're going to skip the bulk of it (we'll pay attention to our ignored lines a little bit later in our series). For now, add the word Includes to the Options line, like so:
Options Indexes FollowSymLinks MultiViews Includes
Options is an Apache directive that can turn on or off different features for the indicated <Directory> and all subdirectories beneath it. Subdirectories can override their parent configuration. In future articles of our series, we'll talk a bit more about the different configurations available to Options.
Because we've made changes to Apache's configuration file, we now need to restart Apache (so that it reloads /etc/httpd/httpd.conf). The easiest way to do this is via our Sharing preference panel. Much like we started the web server in Part 1, we now need to stop and then start it to enable our changes. Do this now. Chuckle once or twice, if you must.
Note: If, after you've clicked Start, the status continually shows "Web Sharing starting up..." for more than a few seconds, you may have an error in your Apache configuration file, caused by a mishap in your editing. The Sharing preference assumes a valid configuration file, and will stall until it receives a positive response from Apache (which it'll never get). To check your configuration for correctness, enter httpd -t in a Terminal--if there's an error, you'll be told the line number to investigate.
To test that SSIs are working properly, rename the index.html we created in part one to index.shtml (since .shtml is the only extension we've enabled SSIs for), and edit to match the snippet below:
<html>
<body>
<h1>Gleefully Served By Mac OS X</h1>
<pre>
<!--#include virtual="/cgi-bin/test-cgi"-->
</pre>
</body>
</html>
Here, we're including the test CGI script into the contents of our main index page. When you load http://127.0.0.1/index.shtml into your browser, you'll see our "Gleefully Served" message, as well as the output of the CGI script itself. We could have easily created a static file (navigation.html) and included that within index.shtml instead. Note: Changing the file extension to .shtml forces us to use a slightly longer URL--http://127.0.0.1/index.shtml and not just http://127.0.0.1/. We'll examine why (and how to fix it using DirectoryIndex) in a future installment of our series.
SSI is configured and working, but what can you do with it? What if your marketing department wants to create an image gallery of the newest ads they've planned? For an advanced look at the possibilities of SSI, check out this SSI Image Gallery article, also written by yours truly.
What's Next?
In our next installment, I'll walk you through how to turn on PHP and test that it's working correctly. Until then, good luck working with CGI and server-side includes, and be sure to Talkback if you've got questions I've yet to answer.
Kevin Hemenway is the coauthor of Mac OS X Hacks, author of Spidering Hacks, and the alter ego of the pervasively strange Morbus Iff, creator of disobey.com, which bills itself as "content for the discontented."
Return to the Mac DevCenter.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 54 of 54.
-
Tiger
2006-01-20 09:48:27 jwmci [Reply | View]
-
Tiger
2006-01-20 10:46:04 Kevin Hemenway |
[Reply | View]
You are running Tiger. These tutorials are for Jaguar (10.2). See http://www.oreillynet.com/pub/au/779 for the latest articles. In short, yes, test-cgi doesn't exist anymore in newer versions of OS X. -
Tiger
2006-05-31 13:38:37 purplegenie [Reply | View]
I've got the empty CGI_Executables folder as well (using Tiger) Massive bummer, as your tutorial is really helping me understand this stuff. I checked out the link you give, found a "using Web Apps with Tiger" article, but the hyperlink for how to set up CGI scripts let me right back here.
I'm in an endless loop with no cgi test files...
Is there somewhere to download the test files, or is there another alternative?
-
PHP and PERL mysteries
2005-09-19 20:59:38 DickG [Reply | View]
I placed IDENTICAL copies of a Perl script and a PHP script into the "/Library/WebServer/CGI-Executables" directory (aka ScriptAlias or /cgi-bin/), and the "/Users/DickG/Sites" directory. I made sure that both php4 and perl were activated in the "hpptd.conf" file, and I made sure all four scripts where executable (chmod 755). There aren't any .htaccess files.
When I access the scripts in "http://127.0.0.1/~DickG/file.pl"
(or file.php), the php code works, but the perl code simply returns itself as text. When I access the scripts in "http://127.0.0.1/cgi-bin/file.pl" (or file.php), the php script returns the dreaded "Premature end of script" message in the Apache error_log, but the perl script works properly.
What gives? Why don't they both execute the same in both places? Seems strange that I get success/failure with php, and failure/success with perl. I would have expected BOTH to succeed or BOTH to fail in each place, but not this mixture.
I'm running Mac OS X 10.3.9 with Safari 1.3.1 (v312.3). PHP is version 4.3.11.
-
problems with a new apache web server
2005-04-21 15:43:05 Gus_Dueñas [Reply | View]
instead of using the default apache web server on my osx jaguar 10.2.8 I've recently intalled a new apache, the 2.0.something and is exactl;y whe my problems have started.
First the site runs very well on my localhost and IP but only in my machine, when I start apache and it starts ok, others computers in the internet can't see any pages in there, I've already installed Open ssl, Bind9, Mysql, Phpmyadmin,PHP 4.3.3 and to be true, I've tried everything, I'm just a designer so that matters of programming are really new for me, would somebody help me?
Right now is ok to run dinamic pages on my localhost but I'd like to show the pages through my cable connection to my clients.
Thanks.
Gustavo Duenas
-
I too am having trouble with the SSI's
2004-06-22 22:19:15 UrbanDerelict [Reply | View]
I'm also having troubles using those SSI's, my home page shows the 'Gleefully served' text but doesn't show any of the stats I saw when I ran the test-cgi.
Help! I really want to get my site working so that I can brag to my friends! They're all laughing at me right now.
Anyone who knows how to solve this puzzle and reads this, please email me: dsilvan@comcast.net
Thanks! -
Hopefully this will help
2006-07-15 19:54:55 jahuda [Reply | View]
I had that same problem and the solution was a simple one. Hopefully it'll work for you.
The tutorial tells you to search for "Library/WebServer/Documents" in the httpd.conf file, and that the second one is the line you want. Well, you have to remember that he is working without all the commented lines that your httpd.conf file probably has.
Instead, search for the line (it'll be your first result)
Directory "/Library/WebServer/Documents"
Make sure the line you are looking at does not say
Directory "/Library/WebServer/Documents/manual
That screwed me up the first time around. Anyway, underneath you'll see some commented lines, and then the "Options" line. Add the word, "Includes," so that it looks like this
Options Indexes FollowSymLinks MultiViews Includes
I hope that helps!
-
missing SSI output!
2004-06-03 06:41:24 mactosh [Reply | View]
First, thanks for GREAT tutorials...
I followed every tutorial from the day I started trying to serve webpages on my machine. The CGI section worked fine but when i follow the directions for implenting the test-cgi in a file i call index.shtml where i put the html: <h1>Gleefully Served By Mac OS X</h1>
<!--#include virtual="/cgi-bin/test-cgi"-->
It does not return the cgi output. Only the Glee-text.
Where am I to look for error. Yes I have restarted the server after I edited the conf file.
Any response will be appreciated. -
RE: missing SSI output!
2006-07-15 19:59:12 jahuda [Reply | View]
If you want a test cgi script simply to see if your cgi will work, try this
#!/usr/bin/perl -wT
print "Content-type: text/html\n\n";
print "Hello, world!\n";
As for enabling your SSI, I had that same problem and the solution was a simple one. Hopefully it'll work for you.
The tutorial tells you to search for "Library/WebServer/Documents" in the httpd.conf file, and that the second one is the line you want. Well, you have to remember that he is working without all the commented lines that your httpd.conf file probably has.
Instead, search for the line (it'll be your first result)
Directory "/Library/WebServer/Documents"
Make sure the line you are looking at does not say
Directory "/Library/WebServer/Documents/manual"
That screwed me up the first time around. Anyway, underneath you'll see some commented lines, and then the "Options" line. Add the word, "Includes," so that it looks like this
Options Indexes FollowSymLinks MultiViews Includes
I hope that helps!
-
Hopefully, I'm not too late to join in...
2004-03-01 11:51:29 dstankalis [Reply | View]
...but I'm using 1.3.29 on a Bondi Blue iMac Running the latest version of Jaguar (10.2.8), and while I can run the test-cgi script from a web server, I get no information when I use the SSIs. Any suggestions, help, etc?
Thank You,
Don
-
Serving up .shtml files from a user's /Sites/ folder
2004-01-28 20:59:16 mentalstasis [Reply | View]
I have been trying to be able to run the same .shtml script from my /Usr/*/Sites/ folder, but to no avail. I tried to edit an entry in the httpd.conf file the looked like
<Directory /Users/*/Sites>
...stuff...
</Directory>
but I couldn't get the .shtml file to use SSI's. Anyone have a solution?
-
Sites directory not named in default httpd.conf
2004-01-11 06:44:03 anonymous2 [Reply | View]
If:
http://127.0.0.1/~username/
gives you a 404 (can't find), check your httpd.conf file for this little chunk setting the directory name appended to a ~username/ browser request (mine was like this by default)...
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
...then (if your web pages are in the OS X-supplied directory called 'Sites') either alter 'public_html' above to read 'Sites' or change your 'Sites' directory to 'public_html'.
- Dave Everitt
-
test cgi files
2004-01-10 23:53:44 anonymous2 [Reply | View]
also loved the article, but i don't have two test cgi files
-
write/create file in cgi-bin problem
2003-09-25 07:31:28 musicarr [Reply | View]
Hi,
Loved the article, but can't seem to create a file in my CGI-Executables folder. The following script should make a new file when it trys to open it (as it, the file trying to be opened, does not exist):
#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "The contents of the file:
";
my $newtext = "newtext from old";
open (USER,"> example.txt");
flock (USER, 2);
print USER $newtext;
close USER;
exit;
But no file is created. Perl should automatically create the file it can't find when you try and open a file to write to. The error log says I don't have permissions to write to this directory. Permissions are set to 775. Isn't that enough? My other host has the permissions set to 755 and I have no problems there. Anyone have any ideas?
Mark
-
Can't use exec cgi
2003-09-23 14:25:54 anonymous2 [Reply | View]
How do I enable the ExecCGI function? When the browser calls for it, I see in my error logs that the cgi was simply "not found" but obviously it is there. Anyone?
-
SSI problem
2003-09-07 12:46:33 anonymous2 [Reply | View]
When I follow to type in the new url, I only found
"Not Found The requested URL /index.shtml was not found on this server. Apache/1.3.27 Server at pcp01720954pcs.union01.nj.comcast.net Port 80"
I check everything and redo everything but it still didn't work.
Could anyone help me?
tuspernova
-
no access to newly added dir
2003-07-10 05:49:24 anonymous2 [Reply | View]
Hello,
A simple questions (but those are the hardest :))
I run Apache on MacOSX. My website is being served on 192.168.1.11,Now I add a directory in the serverroot, add a textfile to it and I type 192.168.1.11/Updates/updates.txt (that's the name of the folder/file I added). Apache cannot find it! although it is there.
Whan I add the file in the root I can see it.
When I do this on windoze it works as expected
I compared rights on the added folder and file - identical to those of folders/files being served.
Why cannot I see this file?
Thanks!
Marc
-
Gleefully served
2003-07-09 02:03:05 anonymous2 [Reply | View]
Okey smokey,
I've been through this article about six times. I've ammended the httpd.conf file, added the code to index.html and changd it to .shtml. I've restarted everything. Apache, my iBook. I even put my coat on, went outside, came back in and started all over again.
When I bring up the page in my browser (safari if thats makes a difference) I just get the 'Gleefully Served' Message and nothing else. Please help me!
Bonza set of articles by the way, I've browsed the later instalments and i'm positivly brimming over with excited anticipation. -
Gleefully served
2004-02-07 12:51:07 ecleo [Reply | View]
I did this tutorial 5 months ago with no problems and having fogotten everything but remembering I liked the tutorial, I tried it again. This time I got stuck at the now popular cgi script point. I figured out what when wrong and felt obliged to add yet a few more suggestions to the arsenal of possible fixes.
If you get the Gleefully served message in your browser but but an error on the CGI test script check the index.shtml file for syntax and the correct path:
<!--#include virtal="/cgi-bin/test-cgi"-->
(I had something like <!--#include virtual="/Library/WebServer/Documents/cgi-bin/test-cgi"-->) jeez.
If your browser can't find the file be sure that you saved the index.shtml file the right place: /Library/WebServer/Documents/index.shtml (one time I clouded over and saved it in Sites)
Also check that you are calling the page in the browser with http://127.0.0.1/index.shtml (not 127.0.0.1/Sites/index.shtml)
-
Gleefully served
2003-09-18 09:48:22 anonymous2 [Reply | View]
Try emptying the safari cache... found in safari menu. -
Gleefully served
2003-09-16 13:34:16 ecleo [Reply | View]
You've probably figured it all out by now but if it helps, I went through the Apache tutorial as well as the CGI gallery tutorial fine using Netscape. When I loaded my index.shtml in Safari just for fun I got, Failure to Connect to Web Server (same page displayed fine in Netscape). Haven't bothered to figure out why, just kept using Netscape.
-
Gleefully served
2003-07-19 07:48:34 anonymous2 [Reply | View]
I am having the same problem. Worked until 1 AM on it. Slept on it and checked everything again in the morning. I'm stumped why it doesn't display the information from the CGI script.
Mike M. -
Gleefully served
2003-07-25 20:38:25 anonymous2 [Reply | View]
I'm in the same boat here, too. Did everything the article said to do, but nothing other than the previous text shows up.
Anyone found the bug in the procedure yet?? -
Gleefully served
2003-08-14 11:52:03 anonymous2 [Reply | View]
I was saving my .shtml file into my ~username/sites folder, but then when I moved it into Library/WebServer/Documents it worked for me...my end goal was to pull a .txt file into an html file and this was a success! =) Now I would like to figure out how to do this on a ASIP/OS9 server...? -
Gleefully served
2003-08-10 10:00:06 anonymous2 [Reply | View]
Well, I had the same problem. I decided to proceed anyway with part 3 and 4... Then I put "Allow from All" instead of "Deny from All" and now I can see the text as well as the cgi output...
Is that OK? -
Gleefully served
2003-11-24 12:09:26 anonymous2 [Reply | View]
I finally found that there wasn't a Directory for "/Library/Webeserver/Documents" - only ones for "/Library/Webeserver/Documents/manual/" and "/Library/Webeserver/Documents/CGI-Executables"
When I added a new directory with the exact code as in the article - I was gleefully served the CGI test script in the body of my index.shtml!!
Hope that helps... -
same problem - different original code
2004-01-18 16:55:08 anonymous2 [Reply | View]
I had the same problem as the guy/gal before me. To begin with, my code added an extra directory called "manual". the original code went something like this:
Alias /manual/ "/Library/WebServer/Documents/manual/"
<Directory "/Library/WebServer/Documents/manual">
Options Indexes FollowSymlinks MultiViews Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
****************************************
The following is the CORRECT code that worked for me. (Don't forget to turn web sharing off and on again to refresh the httpd.conf file!!) good luck:
Alias /Documents/ "/Library/WebServer/Documents/"
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymlinks MultiViews Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory> -
Gleefully served
2003-12-05 14:39:18 anonymous2 [Reply | View]
the text in my config file was different. shown below it has the word Manual.
<Directory "/Library/WebServer/Documents/Manual">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Note -"Manual" - not in the tutorial
So I added the lines below from the tutorial. (I commented them with my name so I could find them later and delete them if it went wrong)
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Note - no "manual"
just as is from the tutorial
-
unable to :w to httpd.conf
2003-06-17 11:20:53 anonymous2 [Reply | View]
for some reason I'm not able to write/save the work in the httpd.conf file. It tells me that the file is read only. However, upon doing this:
1. cd /etc/httpd
2. ls -l
the prompt tells me that Write access is available ... except it won't let me write to the file!
any ideas on this one?
I've tried: "sudo chmod u+w httpd.conf"
but it doesn't help at all.
other ideas?
-
SSI not recognized
2003-06-16 08:18:40 anonymous2 [Reply | View]
When I try to access "http://127.0.0.1/index.shtml" on my machine, all I get is a page that displays the "gleefully serverd by mac os x" text. I saved the index.shtml file (with the new text copied and pasted into it) under /Library/WebServer/Documents/, and I added
<IfModule mod_dir.c>
DirectoryIndex index.html index.shtml index.php
</IfModule>
and uncommented
AddType text/html .shtml
AddHandler server-parsed .shtml
I also stoped and restarted file sharing, and quit and restarted Internet Explorer, however, the cgi information is not showing up. Any ideas as to what I may be doing wrong?
-
SSI not recognized
2003-06-16 08:18:22 anonymous2 [Reply | View]
When I try to access "http://127.0.0.1/index.shtml" on my machine, all I get is a page that displays the "gleefully serverd by mac os x" text. I saved the index.shtml file (with the new text copied and pasted into it) under /Library/WebServer/Documents/, and I added
<IfModule mod_dir.c>
DirectoryIndex index.html index.shtml index.php
</IfModule>
and uncommented
AddType text/html .shtml
AddHandler server-parsed .shtml
I also stoped and restarted file sharing, and quit and restarted Internet Explorer, however, the cgi information is not showing up. Any ideas as to what I may be doing wrong?
-
CGI for 'ugly' user directories?
2003-05-20 18:51:50 anonymous2 [Reply | View]
I'd like to give a user directory the ability to run CGI scripts (specifically Python) but Kevin dismisses that option as 'too ugly'.
I'd like to turn it on for a user, without allowing CGI execution everywhere.
Any ideas? -
CGI for 'ugly' user directories?
2003-05-20 18:58:38 anonymous2 [Reply | View]
Ok, I'm back. I did a little research and I'm guessing you can add the following handler:
AddHandler python-program .py
I suppose I could also just rename the python script to *.cgi.
to add the ability to run Python scripts. Now all I need to do is to figure out how to turn on CGI and/or python scripts for a single home directory.
Halp!
-
Np o Permission for shtml
2003-05-10 17:48:26 anonymous2 [Reply | View]
OK... I'm not having much luck with tese guides. I folowed Part 2 and this is what I get when trying to load index.shtml:
"Forbidden You don't have permission to access /index.shtml on this server."
I did save the httpd.conf file and restarted Apache.
What could be wrong??
Thanks!
-
Proxy Server problem?
2003-05-02 11:29:35 anonymous2 [Reply | View]
When I attempt to open the page (http://127.0.0.1/index.shtml) via Safari I get the following message:
10022 Invalid argument
Which is an MS Proxy Server 2.0 message.
When I disconnect from the network and attempt to open the page I get:
Gleefully Served By Mac OS X
CGI/1.0 test script report:
argc is 0. argv is .
SERVER_SOFTWARE = Apache/1.3.27 (Darwin)
SERVER_NAME = ibook.local
GATEWAY_INTERFACE = CGI/1.1
SERVER_PROTOCOL = INCLUDED
SERVER_PORT = 80
REQUEST_METHOD = GET
HTTP_ACCEPT = */*
PATH_INFO =
PATH_TRANSLATED =
SCRIPT_NAME = /cgi-bin/test-cgi
QUERY_STRING =
REMOTE_HOST =
REMOTE_ADDR = 127.0.0.1
REMOTE_USER =
AUTH_TYPE =
CONTENT_TYPE =
CONTENT_LENGTH =
And that seems to tell me that the proxy server at my office is preventing me from creating and running a web server on my iBook. Is this possible?
Thanks for the great articles. I look forward to the series.
Mike -
Proxy Server problem? - Possible Answer.
2003-05-06 07:24:05 anonymous2 [Reply | View]
I may have found an answer to my question.
I talked to a friend of mine who also just got a Mac and he suggested that I try excluding 127.0.0.1 and localhost in the /System Preferences/Network/Proxies/
Bypass proxy settings for these hosts & domains:
(In the box enter 127.0.0.1, localhost) and then click Apply Now.
This seems to have worked.
On my Windows XP PC I do not have to do this, and he says the the XP OS may be programmed to overlook these two settings when using a proxy server with your browser.
-
Proxy Server problem? - Possible Answer.
2003-05-06 07:40:47 Kevin Hemenway |
[Reply | View]
Handy to know - thanks! -
Proxy Server problem?
2003-05-05 16:31:25 Kevin Hemenway |
[Reply | View]
"And that seems to tell me that the proxy server at my office is preventing me from creating and running a web server on my iBook. Is this possible?"
Certainly possible, yes. Sounds like the proxy server is definitely blocking local access (ie. if you tried to run a FTP server, you'd probably see the same behavior). Unfortunately, there's not much you can do to get around it.
-
just can't get it working
2003-04-19 06:43:05 anonymous2 [Reply | View]
can't seem to get ssi working (Apache 1.3.27 on OSX) , this is what I have done so far:
uncommented:
LoadModule includes_module libexec/httpd/mod_include.so
AddModule mod_include.c
added:
<IfModule mod_dir.c>
DirectoryIndex index.html index.shtml index.php
</IfModule>
AddType text/html .shtml
AddHandler server-parsed .shtml
When I go to my test .shtml page (which displays your IP address ) I get the source i.e. echo var..... etc etc.
Any ideas at all, I am lost.
Roy -
just can't get it working
2003-04-19 07:21:15 Kevin Hemenway |
[Reply | View]
After you made those changes, did you restart the Apache web server? Any change you make to the httpd.conf has to be followed by a restart - else, they won't take effect. Finally, what's the exact entry you're putting in your .shtml file?
-
Please help
2003-04-14 12:22:19 anonymous2 [Reply | View]
Great Atricle
I need some help
I have been looking everywhere for more info on VHosts. I have read all the stuff in apache's documentation and website but it is vague and confusing.
If I have a server, with only one IP, and I want to serve www.mysite1.com and www.mysite2.com from the same cpu. Can i put both of these in the /library/webserver/documents folder. How do i configure apache to know the difference.
Thanks






I'm running Mac OS X 10.4.4 and Apache 1.3.33.
When I run...
Johns-Computer:~ john$ http://127.0.0.1/cgi-bin/test-cgi
I get...
-bash: http://127.0.0.1/cgi-bin/test-cgi: No such file or directory
and my /Library/WebServer/CGI-Executables/ diretory is empty.
Is this Tiger or my system?