Apache Web-Serving with Mac OS X: Part 1
by Kevin Hemenway12/07/2001
Editor's note: Most people know that Mac OS X ships with a built-in Apache web server, but don't realize that it's easy to configure and run. In fact, you can host a web site in minutes after completing just a few simple steps.
But that doesn't mean that Mac OS X is a lightweight in this category. It's not. In fact, you can drill down and get very serious with this state-of-the-art serving software.
In this first installment of a multi-part series, Kevin Hemenway shows you how to start serving web pages directly from your Mac. In the articles that follow, he'll show you the techniques that system administrators use for maintaing robust web sites. As you read Kevin's tutorials, you'll learn the functions of some of those mysterious folders deep within your Mac OS X hard drive, and will soon become your own "X" Sys Admin.
You stare at the screen, fingers twitching nervously. You've been telling the rest of the world how great Mac OS X is, basking in the sheer enjoyment of upgrading your Classic applications to jelly-powered delights. After much spouting, your boss has finally given you a chance to prove your saliva-laced rantings. The task is quite simple: "build the GatesMcFarlaneCo [1] intranet with features up the wazoo."
Once again, it's time to convince the herd about Mac superiority. What better way to begin than to use a well-respected web server that's proven its mettle time and time again?
Introducing Apache to the Mac faithful
Apache is regarded as the most popular web server available today. With its incredible portability and support for anything you'd ever want to do, Apple wisely decided to ship Apache with its Unix-based operating system. With this web-serving powerhouse at your fingertips, I'll explain how you can impress your boss and solidify your love for Mac OS X, all at the same time.
Getting started with Apache and Mac OS X
The easiest way to begin Apache web-serving is via your Mac OS X system preferences. Click your Apple Menu, choose "System Preferences," then select "Sharing". Within the Sharing preference panel you'll see a number of options, only one of which is of immediate value. See that Web Sharing label? Simply click the Start button beneath it to fire-up the built-in Apache web server.

Figure 1. Apple has cleverly disguised the Apache Web Server as the "Web Sharing" option in the "Sharing" system preference.
By default, the Apache server has been configured to use your Mac OS X "short" user name. (You can find your short user name in the Users preference panel. Click on "Edit User".) If your short user name is "morbus", for example, you can access your personal web site by opening any web browser on the local network and typing http://127.0.0.1/~morbus/. Don't forget that last forward slash!
That 127.0.0.1 (also known as "localhost") is pretty special -- every computer has one. Both names represent the computer itself; by going to 127.0.0.1 in a web browser, you are accessing the local Apache web server you activated in the Sharing preference panel.
Now that you know an easy way to serve a site to local users, how do make your web pages available to folks on the World Wide Web?
The answer is found in your Sharing preference panel. Go there and note the IP address listed. Using that IP address is how outsiders can access your Apache server. If you see 209.204.146.22, visitors could access http://209.204.146.22/~morbus/ and visit your personal web site. In a future article, I'll discuss how to block outside access to only those you deem worthy.
Your personal web space
If you went to your personal web site now, you'd see a generic introduction written by Apple describing Apache and how to use "Personal Web Sharing." We'll soon be deleting this page, but be sure to give it a read because it contains some helpful bits of information.
Much in the same way your personal web site is based on your user name, so is the location of your web space in the Mac OS X file system. Continuing our assumption of the "morbus" user name, our current web space lives at /Users/morbus/Sites/.
If you browse there now, you'll see the introductory file (index.html) as well as an images/ subdirectory. Delete (or back up) everything, and use a text editor (such as BBEdit) to create a new index.html file with the following contents:
<html>
<body>
<h1>Gleefully Served by Mac OS X</h1>
</body>
</html>
Upon saving, reload http://127.0.0.1/~morbus/, and you'll see your rather bland, boring homepage. This certainly isn't very impressive -- downright pathetic, actually. You can't use server-side includes, can't install CGI programs to your /Sites directory, and can't use PHP or mod_perl. Plus, your inTRAnet is wide open to the InTERnet. Not so good, bub.
Turning on the magic
|
Related Reading
|
What we've done so far won't impress anyone. We have no features and an ugly web site address filled with tildes and unprofessional user names. We've got a long way to go before we can feel good about showing off our masterful Mac OS X box.
Our first step is to give the site a prettier URL. Above, we placed our index.html file into our own user directory (such as /Users/morbus/Sites/) -- now, we'll place a copy into Apache's DocumentRoot. The DocumentRoot is the default server (not user) location that Apache will serve documents from. For Mac OS X, this is located in the /Library/Webserver/Documents/ directory.
This directory also has a default introductory file -- to see it, visit http://127.0.0.1/ within your preferred web browser.
Localization or "content negotiation"
If you browse to /Library/Webserver/Documents/, you'll inadvertently run across another nice feature of Apache: content negotiation. Depending on your visitor, Apache can serve up international versions of your site -- for example, index.html.en for English speakers, or French (index.html.fr)
and German (index.html.de) versions. Apache for OS X comes with over 25 translated versions of the default index.html file.
You can take advantage of this feature on your own pages. When you're creating the GatesMcFarlaneCo intranet in your native language, you can translate your pages into other languages and add the two-letter language encoding ("de" for German", "fr" for French, "es" for Spanish, etc.) to the file name. Any time international employees of GatesMcFarlaneCo access your intranet, they'll automatically be served the page that's in their native tongue.
For now, backup or delete all the
files you see in /Library/Webserver/Documents/ and copy over the index.html file we created a few steps ago. If you return to http://127.0.0.1/, you'll see our "Gleefully Served"
page.
What's next?
This is a good point to catch your breath and play with what I've outlined here. You might want to build some nicer HTML pages to serve as your test site.
In the next installment of this series, I'll tackle CGI access for your Apache server. Until then, enjoy playing with your new Mac OS X web server.
[1] A rather stupid joke within a joke. McFarlane Toys is often considered the "one to beat" in action figures, and thus the loose association with Bill Gates. The combination of the two names resembles "Gates McFadden" who played Beverly Crusher on Star Trek: The Next Generation. Wil Wheaton, who played her TV son, Wesley Crusher, recently announced that he may be reprising his role with a cameo appearance in the final Star Trek: TNG movie. Wesley Crusher is often regarded as the most-despised Star Trek: TNG character, and that's where we make full circle back to Bill Gates. Glad you wondered?
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 141 of 141.
-
Mac OS X (Snowleopard)
2009-10-08 12:51:20 Andynic [Reply | View]
Hi,
I read the info with interest at http://macdevcenter.com/pub/a/mac/2001/12/07/apache.html
However, I cannot find anything to do with Apache on my system.
Tried a search with the finder for httpd.conf but it turned up nil.
I'm very new at OS X. Til now I've been using Apache 2.2 on a Windows XP Professional machine.
Can someone please steer me in the right direction?
Thanks,
Andynic
-
Pages are displaying source code only
2009-06-03 12:03:10 lz9999 [Reply | View]
I have set up my Apache server on my Mac, however, when I place a index.html that I have created in the DocumentRoot directory (Library/WebServer/Documents) and type localhost in my browser to view it, it just displays the source code of the page only. I can't figure out what to do, the default Apache index files worked fine dispalying the web page and not the source code.
-
a more advanced question
2008-07-31 03:54:23 spankey [Reply | View]
hay all,
I have a question, I am running OS X 10.5.4 my apache/mysql/phpmyadmin etc is running well.
I can see http://localhost:8888/sitename.com
all of which I am happy with, but I have just moved over to mac, and don't yet know how to change the config so I can do this
Site Dir: /user/wwwroot/sitename.com
In Firefox (type address): http://dev.sitename.com
on a windows system this is setup in /etc/hosts, but have no idea on a mac
plz help and thanks in advance.
-
httpd.conf
2008-05-12 05:56:25 IDunham [Reply | View]
Note that on leopard 10.5.2 the config file is now at
/private/etc/apache2/httpd.conf
There is an earlier version in /private/etc/httpd/ but changes there won't make any difference to your webserver configurations :-(
-
Solution to 403 Forbidden. You don't have permission to access
2007-12-15 00:21:11 louisej [Reply | View]
Some people, including me, have put web pages in their personal Sites folder (~/Sites), then turned on Web Sharing and tried to display those web pages. Instead of seeing our web pages, we see
"403 Forbidden. You don't have permission to access"
I found an explanation of how to fix the problem in
http://www.gigoblog.com/2007/11/08/configure-apache-web-sharing-for-user-accounts-in-mac-os-x-105-leopard/
I followed that web pages "Activate All User Accounts" instructions, and created a file called /private/etc/apache2/users/local.conf. Now I can see my web pages - both on the computer that contains the web pages, and also on another computer which is connected to the Internet.
The only changes that I'd put into the gigoblog explanation are these:
1) Make sure that you're signed on as a system administrator before you start typing commands in Terminal.
2) After you're done, if you don't usually log onto your Mac as an adminstrator, exit from your administrator session.
-
Thats Right, I need help. How do I change the [Name.home] page instead of the name.home/~name
2007-12-10 14:40:07 Will-(Probably-Needs-Help!) [Reply | View]
I'm running Mac OS X 10.4.11, MacBook. Intel Core 2 Duo, Useless information probably though I feel it neccessary to say. I cannot change the name.home page (Or the 127.0.0.1 page. I DO NOT need to know how to change the 127.0.0.1/~morbus/ page. Anyway, Just wonderin'
Thanks, Will
-
No access on Safari
2007-12-01 09:46:38 Garnet [Reply | View]
I ran my address on "Safari", and got "FORBIDDEN
You don't have permission to access /~LODESTONE/ on this server."
Then it gives the "Apache" server details and port number below a line.
What does this mean?
Can I not run "Apache" without changing my browser.
Does the fact that I used FTP to attempt to upload a website to a server have anything to do with this?
-
Ip Probloms
2007-11-22 08:33:35 forthfriend [Reply | View]
I've heard that you have to set up your router to work with the outside ip function, but does an airport or a cable modem count as a router?
SOMEONE PLEASE HELP!!!
-
Ip Probloms
2007-11-17 14:17:41 forthfriend [Reply | View]
In Personal Web Sharing, when I look at my ip, it isn't my ip, but rather 10.0.1.2. How do I change this?
-
Problem with Apache
2007-11-08 18:50:37 confounded [Reply | View]
Hi,
I was trying to learn about servers, I don't know anything about php or servers, except for HTML.
I'm having a problem with apache (I never knew Macs came with a server). I'm nervous that I may have screwed up something with the Apache.
I turned on "Personal Web Sharing" and have OS X v10.4.10, did the exercise "Gleefully Served by Mac OS X". I see the page in Safari browser if I type in /Library/Webserver/Documents/ but not if I type in http://127.0.0.1/
If I do that, I keep getting a message "cannot connect to local host"
The internet is shared by 2 computers, one a pc and this mac.
Is there a way to resolve this?
Thanks for any advice
Confounded
-
new to macs
2007-08-22 14:57:09 hadandowa [Reply | View]
Hi,
Not only am i new to macs but i know no programming at all. I can get http://myip/~myusername/ to work with apple/apache message and then my own page - yay! But http://myip/ only comes up with a different apache (no apple ref) message that I can't change, even by going into library/...../webserver and changing all the files in documents to my index.html file - help!
I also can't access anything from 'outside'. And don't know how to change "router" details but have noticed that eg my ip is 192.168.1.64 but router is 192.168.1.254 so how do I make one talk to the other.
Please help in BASIC terms an enthusiastic but clueless user - assume no knowledge except love of macs. (reference to truly step-by-step instructions expecting no knowledge would be gratefully received) :-)
-
Servlet support
2007-07-05 23:21:03 rajuk_2004 [Reply | View]
Hi,
I am new to Mac OS. I am able to browse http://127.0.0.1/~morbus/ and start & stop using "sudo apachectl start".
But how to run a servlet on this apache server?
Is it possible to deploye java web application(war file) directly?
Thanks in advance.
rajk
-
Log modul for web server.
2007-06-26 11:28:42 The-final-cut [Reply | View]
Hello from Sarajevo.
I have already set web server on my dual g500 ,it works just fine behind the NAT ,and thanks to the fact that router support dyndns its available from the internet.
I also have set FTP server on the same computer and its just great!
The think that i would like to do next is to have little better log for monitoring access of the web server.
Default log is situated in console where all of the other mac logs are.
Also is there any differences form apache documentation for linux and mac os x ,so is it possible to use this documentation for OS x .
And at last default apache at mac os x is 1.3
P.S. sorry for bad english
Do we need to upgrade to 2.2
-
Apache web serving & stealth mode
2007-06-08 02:39:40 niteOwl [Reply | View]
Thanks for the great article - it's really helped me configure Apache & PHP on my Mac.
My problem is this - I recently enabled stealth mode in system preferences > sharing > firewall (Mac OS X Tiger). This is great for keeping me 'under the radar' while on the Net, but the downside is since I use PHP functions in my web development that fetch the server name, these are no longer working when I test pages pages served from the Sites folder (i.e. stealth mode on - no response).
Is there a way I can configure the firewall to allow incoming requests to my IP address only, but not respond to anything else? At the moment it's a hassle turning stealth mode on & off when developing.
I'm guessing I might need to go into the terminal, but I have no idea of the commands.
-
a thing i don't understand..
2007-05-26 23:20:43 D.C. [Reply | View]
.. I'm running a Mac Mini behind a router, and when I switch on Apache, I see the address 192.168.0.10 in my System Preferences. At the risk of stating the obvious, this is only going to work within my LAN.
I'd like to have everything in ~/Sites as I create my webpages using iWeb, and I just want to be able to 'publish' to that directory, and not have to faff around with anything else.
Afterwards, I'm going to change DNS on my domain name, and hope that when people 'on the web' type my domain name, they'll automatically be served what's in ~/Sites.
I've tried changing /etc/httpd/httpd.conf to point to that directory, but I get an error 503. When I ask the question on Usenet, I get insulted and accused of having 'broken' apache.
Can anyone help ? Thanks...
D.C.
-
trouble
2007-03-28 04:29:02 madhurima [Reply | View]
i did the neccessary changes in httpd.conf file as given in http://www.cgi101.com/book/intro.html and wrote my first cgi program placing it in Sites folder. But when i tried to view my page in safari an error of permission denied is being given. Want some help please...
-
Please HELP with Apache
2007-03-16 14:53:53 wencryo [Reply | View]
I need help with Apache. I think I have modified some files, and now nothing is working.
if I do
sudo /usr/local/apache2/bin/apachectl start
it says:
httpd (pid 270) already running
but I can get Web Sharing to start up
can someody help me? PLEASEEEEEEE
-
Web Sharing Starting Up...
2007-02-18 05:51:09 shuffm [Reply | View]
Great article. I want to start doing this. I have a brand new MacBook Pro. I haven't really installed anything on it yet.
I followed the directions, and web sharing just says it's starting but never starts.
I went to the terminal and typed: sudo apachectl start
I get this:
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/+entropy-php.conf
Syntax error on line 8 of /private/etc/httpd/users/+entropy-php.conf:
Cannot load /usr/local/php5/libphp5.so into server: (reason unknown)
/usr/sbin/apachectl start: httpd could not be started
I'm a Windows and ASP guy. I have no clue how to get the server running. Sounds easy, but something is apparently not working. A couple other people have the same problem on this post, but I see no solutions. Please help...anybody. Thanks.
-
Problem Connecting to Mysql Please help
2007-01-30 20:27:36 Lucci [Reply | View]
I have successfully set up my development site and am trying to connect to mysql. I installed the DBI module. Here is what I am turning up in the error log
###########
#Error
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
Expected in: dynamic lookup
dyld: Symbol not found: _mysql_init
Referenced from: /Library/Perl/5.8.6/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle
Expected in: dynamic lookup
[Tue Jan 30 18:28:28 2007] [error] [client 72.134.38.10] Premature end of script headers: /Users/calypso_44256/Sites/first.cgi
#end Error
###########
Script I am using to connect
#!/usr/bin/perl
use CGI;
use Date::Manip;
use DBI;
#
print "Content-type: text/html\n\n";
my $server="localhost"; #also tried the valid IP address
my $user="root";
my $pass="******";
my $name="*****";
############
#
my $source = "DBI:mysql:$name:$server";
my $dbh=DBI->connect($source,$user,$pass) or die "Can't Connect to $config{'dataSource'}
$DBI::errstr";
-
apache on macs
2007-01-25 11:10:38 colombimac [Reply | View]
that was good but I need more info about running .pl or .cgi programms.
-
HTML rendered in Chineese font??
2007-01-06 18:03:29 StephenWilkerson [Reply | View]
I started apache and created a very simple html page. When I open this page in any browser it is rendered in a Chinesse font? Has anyone experienced this problem?
-
PHP module
2006-12-22 02:12:41 ianwj [Reply | View]
I deleted most of the files in /Library/Webserver/Documents/ as mentioned in the article. However the PHP module will not work and Apache post the following error:
[Fri Dec 22 17:50:26 2006] [error] [client 192.168.0.2] File does not exist: /Library/WebServer/Documents/favicon.ico
Seems it want to see the favicon.ico file. What is this and how do I get it back?
-
Web server can connect locally but cannot remotely
2006-12-01 10:31:19 sjm65536 [Reply | View]
I have Personal Web Sharing turned On, the Firewall is turned off, and computers (Tiger and WinXP) on my private network can connect to my webpage (and my users' private webpages) via my domain name. But remote visitors cannot connect to my webpage (from their computers on other networks) via my domain name (nor my IP address).
What could be preventing remote webpage connections?
Thank you in advance.
--sjm65536
-
httpd could not be started
2006-11-17 15:05:36 simple_ton [Reply | View]
Hello, my trouble is that in my OS X preferences under Sharing, Personal Web Sharing does not respond properly when I select Stop or Start.
Within Terminal, I tryied to start Apache using: sudo apachectl start
and this is the message that follows:
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/+entropy-php.conf
[Fri Nov 17 15:55:23 2006] [warn] module mod_php5.c is already added, skipping
Processing config file: /private/etc/httpd/users/username.conf
/usr/sbin/apachectl: line 193: 551 Bus error $HTTPD
/usr/sbin/apachectl start: httpd could not be started
MyComp:~ username$
I activated the php mods in httpd but altered nothing else. It worked up until one day at which time it gave me the previous message upon trying to start Apache.
What is wrong and what should I do to correct it?
Thanks for the help!
-
formated hdd
2006-11-09 15:47:17 thomascattral [Reply | View]
I formatted the hdd on my mac, and now apache isnt installed and i cannot run the personal web sharing, a function in which i trully loved. How can I fix this problem?
-
apche on darwin (mac os x)
2006-08-13 04:33:23 Saroo [Reply | View]
Hello all,
I am trying to execute .pm file on in-built apache webserver of mac os x 10.4 and instead of executing my script it is executing only .html file and printing as it is as a text the entire perl script. The script I a trying to execute is rocks.pm . If the same script I execute as rocks.pl it dint display anything just a blank page. Somebody please help.
Thanxs!!!
-
apache
2006-07-09 19:55:25 elfarose [Reply | View]
Do I have to be a geek to learn this? do I have to know Unix, script, or html?
-
Apache doesn't work
2006-06-21 09:05:07 balijewel [Reply | View]
Hello, I'm using iMac intel chip with mac osx 10.4.6. I have the problem on Apache webserver:
1. On my system preferences/sharing, personal sharing check box is off. So i can not make it on.
2. localhost doesn't work, apache need to be resatart. I try to go to terminal and type sudo apachectl start ( sudo: apachectl: command not found ) and sudo apachectl graceful ( sudo: apachectl: command not found ). Please help me. Thanks,
Deni
-
i finally did it!!!!!!!! yeah !!!!!!!!!!!!!
2006-04-17 18:14:26 sputnikV [Reply | View]
I fianlly got my web server running!!!
-
javascript and apache for os x
2006-04-17 17:22:46 newtothis [Reply | View]
I have Apache installed and running but the javascript isn't working when I preview pages from Dreamweaver, using the localhost as a testing server. Did any of this make sense? I thought javascript is a clientside script, so why won't my browser process it when it's the local browser? I tried changing the server model to ASP javascript but that didn't work. You may finally have come across the person who know the least and has posted to this page! Thanks in advance for any insight.
-
Simple, and elegant
2006-03-28 11:05:54 pbshoe [Reply | View]
I like the writing. makes this semi-complex issue, very simple. thanks.
-
FTP
2006-03-18 00:08:22 BHEIBERT [Reply | View]
Is it possible to customize what appears in the ftp server when the user logs on?
I am using Web Sharing and MacOS X with No-IP Software
www.no-ip.com
-
CGI-BIN
2006-03-17 23:39:45 BHEIBERT [Reply | View]
Willl there be a part (whatever) on how to create/use cgi-bin access on the server?
-
Thought I'd share how to make the url nicer
2006-03-17 23:35:24 BHEIBERT [Reply | View]
I am using No-IP IP Updating software from no-ip.com
and I have a account with them that I registed my domain name with and it along with the MacOS X Web Sharing puts my web page on a nice url for example my url is heibertweb.com and it is being served off of my Macintosh computer
-
Cannot log onto my webpage using MAC OX 10.4.5
2006-03-05 19:15:27 Netripized [Reply | View]
I'm having the problem, Using the Belkin router (F5D7230-4).
From outside of the home I can't get to the website running on my machine. When I type out my server's (Personal Web Sharing - Apache) IP address (192.168.2.3) I always get the main router page.
I've set up Belkin Router's virtual server to point out port 80 TCP to this ip address shown above.
From outside of home, I cannot get onto my website using my home's IP address (69.xxx.xxx.xxx).
Any ideas?
-
airport
2006-02-03 02:47:25 copperX [Reply | View]
issues while using an airport to access the internet and use OS x as a webserver ??
-
NOT FOUND
2005-11-30 03:40:50 NewMacUser [Reply | View]
I was turning on the Web sharing.
But when I open the browser and writes http://127.0.0.1/~myshirtusername/
or http://localhost/~myshortusername/ or
just http://127.0.0.1/ .... I just get the message: Not Found. The requested URL... was not found at this server. Apache/1.3.33 Server at cak.local port 80
What is wrong?
I tryed to find the httpd.conf file, to take a look at the root adress, but I didn't find it.
-
Need Help Setting Up
2005-10-17 13:24:40 sputnikV [Reply | View]
I have an Apple G4 Cube with OSX 10.3 on it.
I want to be able to host a website off of it that I can use for data that me and my friends can access, so I don't need a DNS domain name or any of that stuff.
I am currently behind DSL modem/router with no firewall except on the mac. I have several other things and another router pluged in to the router ports. I have two computers on the second router including the mac.
I followed the instructions above (press the web sharing button), and I can access my site internaly but not externaly.
How can I access them externaly? (like at someone else's house?)
-
Modifying the config file of Apache
2005-10-01 01:27:35 macguru65 [Reply | View]
Hello,
Anybody can help me on this.. How can I modify the config file for the Apache web server on OS X system to use another folder as the htdocs root of the web server?
Thank You
-
Personal WeB Sharing
2005-09-19 17:53:48 UncleJohn [Reply | View]
I'm running OS X 10.4. Can't turn on Personal Web Sharing. Click box--get "Starting... " but it never happens. Any ideas?
-
bbedit tool error -10814
2005-08-31 16:18:08 monica1 [Reply | View]
If I type 'bbedit /etc/httpd/httpd.conf' into terminal I get an error message 'Sorry, the bbedit tool has experienced an error: -10814 LaunchServices could not locate your copy of BBEdit.'
I use system 10.4.2 and BBedit 7.1.4.
Any idea how to fix this?
Thanks!
-
I'm not sure ....
2005-07-07 04:41:25 PHP_lovers [Reply | View]
Ok -- I'm not sure if anyone is still reading this or not, but it's worth a shot.
I'm having some really strange things happening. I'm trying to get a simple server up and running using Jaguar. I've followed all of the instructions and understand most of it.
Problem #1
I have configured my router to pass requests to port 80 to a specified IP address. In my case, I'm using **.**.**.25 -- where the first three fields are the first three digits in the routers IP address (Using a simple Belkin router, I'm unable to change these anyway).
My problem occurs when I try to configure the server IP. When I set it to get an IP via DHCP, I have an internet connection; however, when I choose Configure IP Manual" in the Network Control Panel and enter all of the information, I lose internet connection. For the manual configuration, I type in the correct IP, Subnet Mask, and Router IP.
Interestingly, when I swith back to get IP via DHCP, the router sets the same address that I have in Manual and I then have an internet connection. Of course I don't want to have a dynamic IP on my server (ie, if my router has to be reset, etc... it may assign my server another IP).
Does anyone have an idea? Ive also tried using DHCP with a Manual Address with the same results....my computer doesn't see the router.
Problem #2
Just to test it out, I left my computer set to using "DHCP" to obtain the IP address. I then simply configured my router to pass web requests to the IP it assigned to that computer. However, when I tested it from another computer (ie, entered my permanent IP in a browser), I did not see my webpage. Instead, I got the front-page utility of my router! This freaked me out and I disabled websharing and the virtual server of my router. Again, any help will be very appreciated.
WAny help will be appreciated!
thx,
Mike
-
Outgrown hard disk space-How to overcome it
2005-05-27 01:55:52 WSG-Photo [Reply | View]
I would be thankful if anyone can advise me how to configure Apache in Mac OS X to overcome the default hard disk limitation.
I handles huge number of digital photos in the website (a necessity). I had outgrown the default hard disk capacity. I wish to configure Apache web server to look for Index.html or secondary level HTMLs in an external hard disk instead.
Can somebody please help.
Thanks in advance.
-
problems with apapche2
2005-04-22 21:52:17 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
-
Does it do any good?
2005-04-01 14:12:37 kathryne [Reply | View]
...to post on this forum? I just answered to, " Autostart Apache 2 after reboot?" and my post doesn't show up beneath the poster's question, rather I have to click view to see my post.
So, I know the question I tagged at the end, won't show up either. Here it goes again...
Anyone have any idea where I can find the Apache 2. upgrade/version? Think I saw it somewhere, but I can't remember where. Thanx!
Kathryne
-
I can't get this to work
2005-01-07 17:11:48 Cineander [Reply | View]
I see the webpage on my own computer, but no one on any other comuter can see it.
-
Access to the sites
2005-01-03 08:28:40 mhaysom [Reply | View]
Hi, was wondering if someone can help me, ive got a LAN setup with my Mac and PC, the Pc has the main connections with the Mac running off it, ive set up a server on the Mac and when i test it on the PC i can obviously see it but is it possile for other people not on the network to see it? i guess this might be a dumb question but im not too good with all this network stuff :D. id appreciate any help. many thanks in advance..
-
Autostart Apache 2 after reboot?
2004-12-29 16:02:59 RickMGoldie [Reply | View]
Anyone know how to get apache 2 to startup automatically after OSX reboots?
-
Is FileVault the problem?
2004-12-08 11:41:08 Drachentöter [Reply | View]
I was confronted with an error message "You have not the Permission to ...." after enableing WebSharing. But access to localhost worked fine. Mhh, this is actually the Documentroot directory which is far away from my user directory. That in mind I turned FileVault off and now it worked!! Has anybody similiar expiriences?
-
hey... what happened to default.html??
2004-11-27 14:22:48 riggs_jt [Reply | View]
I have a virtual host set up on my mac... when I try "http://mysite/" I receive a "Forbidden - You don't have permission to access / on this server" error. However, when I try "http://mysite/default.html" the site loads as expected. Why is Apache trying to access a site index rather than the default.html page? Am I missing something in the httpd.conf?
-
Why can I view PHP pages but not html ones?
2004-11-16 07:47:15 CrazyPsyRoller [Reply | View]
My problem seems rather strange...I have no problem viewing php pages through my browser or LAN using this kind of address
http://127.0.0.1/~Tristian%20Bougeard/insert.php
but when i try to view a html page in the same way I get this error in my browser...
"
Forbidden
You don't have permission to access /~Tristian Bougeard/index.html on this server.
Apache/1.3.29 Server at tristian-bougeards-computer.local Port 80"
im probly being really dumb, anyone got any idea's how to sort this out?
-
Apache doesn't start anymore
2004-09-16 07:12:09 pixelized [Reply | View]
Since i wasn't able to save changes to the httpd.conf file, i made a stupid thing: after having edited it, i saved it on the desktop and then i changed the file properties (permissions, owner and so on), copying them from those ones belonging to the original file. Then i replaced my new httpd.conf file with the original one, placed in httpd folder. Now, if i try to turn on 'web sharing', from the sys prefs, nothing happens (it says it is starting but it never starts). I see that in the httpd folder there is a httpd.config.bak file, can i enable it to somehow make it work?it is a copy of the httpd.conf original file, isn't it? There's also a httpd.conf.default file, over there... maybe it can be used too? you told to use sudo to edit httpd.conf or bbedit shell, but isn't there any other way to edit (and save!!) it? Thanks in advance, i hope you'll help me.
PS: i'm running Panther 10.3.4 on a 1.25GHz PowerPCG4
-
router setup/manual IP
2004-06-15 20:51:58 bigcomposer [Reply | View]
Ok -- I'm not sure if anyone is still reading this or not, but it's worth a shot.
I'm having some really strange things happening. I'm trying to get a simple server up and running using Jaguar. I've followed all of the instructions and understand most of it.
Problem #1
I have configured my router to pass requests to port 80 to a specified IP address. In my case, I'm using **.**.**.25 -- where the first three fields are the first three digits in the routers IP address (Using a simple Belkin router, I'm unable to change these anyway).
My problem occurs when I try to configure the server IP. When I set it to get an IP via DHCP, I have an internet connection; however, when I choose Configure IP Manual" in the Network Control Panel and enter all of the information, I lose internet connection. For the manual configuration, I type in the correct IP, Subnet Mask, and Router IP.
Interestingly, when I swith back to get IP via DHCP, the router sets the same address that I have in Manual and I then have an internet connection. Of course I don't want to have a dynamic IP on my server (ie, if my router has to be reset, etc... it may assign my server another IP).
Does anyone have an idea? Ive also tried using DHCP with a Manual Address with the same results....my computer doesn't see the router.
Problem #2
Just to test it out, I left my computer set to using "DHCP" to obtain the IP address. I then simply configured my router to pass web requests to the IP it assigned to that computer. However, when I tested it from another computer (ie, entered my permanent IP in a browser), I did not see my webpage. Instead, I got the front-page utility of my router! This freaked me out and I disabled websharing and the virtual server of my router. Again, any help will be very appreciated.
Any help will be appreciated!
thx,
Mike
-
CGI :)
2004-05-11 05:41:47 UrbanDerelict [Reply | View]
I found them, there are articles 1 through 5 or six, so these should keep me busy for a while. Thanks!
-
my mistake...
2004-05-10 12:10:23 UrbanDerelict [Reply | View]
It seems to me that the CGI-Executables is outside the Documents directory, so I don't know how http requests would get to it; I don't know how to invoke cgi-scripts in my web pages.
-
I desperately need the 2nd installment!
2004-05-10 12:06:08 UrbanDerelict [Reply | View]
I've already registered a domain and have a simple site running, and I've been looking for weeks on how to get information about CGI scripting. First thing I learned was that it's not a language like C or C++ or whatever; CGI scripting could be written in any language.
Anyway, I've already moved my site to the Library/WebServer/Documents directory, and along side the Documents directory there exists a CGI-Executables directory, too.
I've already messed with my httpd.conf too, to allow CGI scripting, but I don't know where to put them, since there's no 'CGI-Executables' directory along side the Library/WebServer/Documents dir.
I've ordered CGI 101, but I won't get it for 3 to 5 days!
-
problems starting web sharing
2004-02-18 06:20:17 jonners [Reply | View]
I am running panther 10.3 on a G4 with airport. I have tried to install PHP using this: http://www.entropy.ch/software/macosx/php/
but the installer said there was an error on line #25 of httpd.conf
I wanted to restart or check that apache was workign so went to system preferences and turned web sharing on.......but is says, ;starting' and just stays like that and never starts. Can anyone think why?
Thanks,
jon
-
can view site on LAN but not WAN???
2003-12-02 09:05:45 kidloco [Reply | View]
Hi,
I've been trying to set up my G4 to run Dynamic web sites, my web site has been tested on P.C's and works fine on both LAN and WAN. But for some reason whenever i use my Mac to host the site it says "Forbidden 403" when trying to access the site from the internet but runs fine on my network. i thought it could be the dynamic content so i removed this making the site static and still no joy. the site is stored inside /library/WebServer/Documents/site folder/ which should work fine. The Mac is connected to a network of 4 Mac's and the internet connection goes through a hub and a router, do you think my router could be causing this problem????
cheers all.
rik_mcclure@hotmail.com
-
'The attempt to load 'Accessing URL:http://localhost/' failed
2003-11-24 06:14:11 anonymous2 [Reply | View]
All access with explorer gives me the message:
"The attempt to load 'Accessing URL:http://localhost/' failed." Or whatever I try (127.0.0.1; mycomputername; localhost/~myname/ etc)
I know the web server is working as "telnet localhost 80" followed by "GET / HTTP/1.0" works.
Does anyone know how to fix this? Is it an explorer setup thing? I am not connected to a network and cannot find any set-up options in explorer that might give me a clue to fixing it.
Thanks MM
-
'The attempt to load 'Accessing URL:http://localhost/' failed
2003-11-24 06:14:07 anonymous2 [Reply | View]
All access with explorer gives me the message:
"The attempt to load 'Accessing URL:http://localhost/' failed." Or whatever I try (127.0.0.1; mycomputername; localhost/~myname/ etc)
I know the web server is working as "telnet localhost 80" followed by "GET / HTTP/1.0" works.
Does anyone know how to fix this? Is it an explorer setup thing? I am not connected to a network and cannot find any set-up options in explorer that might give me a clue to fixing it.
Thanks MM
-
Configuring Apache
2003-10-20 06:02:29 anonymous2 [Reply | View]
Hi,
no doubt a stupid question. I can't get Apache to display my index.php file.
I put all my file in a directory "Users/marc/Sites/wwwweb". The main page = index.php. I want to server this through Apache but Apache keeps telling me
"Forbidden
You don't have permission to access / on this server."
I checked te following:
> httpd runs as user www
from httpd.config:
User www
Group www
I did
sudo chown -R www:www /Users/marc/Sites/wwwweb"
httpd is started as root (sudo apachectl start) because using "apachectl start" I got a errmsg "Could not bind to port 80" in the error log.
index.php is added to " DirectoryIndex" in httpd.config;
"addmodule" and "loadmodule" for php are uncommented;
"addtype" for php is added
I have no clue as to what else can be done.
Thanks,
Marc
-
running a site without an internet connection
2003-10-02 08:04:23 anonymous2 [Reply | View]
Hi. Thanks for your very helpful information. My boss wants me to put a complete, working version of our site (usually hosted at a remove server) on his laptop so he can demonstrate it at trade shows, where he won't have a connection. Can you give me an idea on how to do this? Thanks very much!
J.M.
-
feedback
2003-08-27 08:58:57 anonymous2 [Reply | View]
You're a great writer. Very clear and helpful.
-
MacFarlane toys
2003-07-26 05:44:50 anonymous2 [Reply | View]
Dude, that is the most convoluted, twisted Star Trek/Microsoft über-nerd in-joke I have ever heard. My God! You O'Reilly guys are like a genetically enhanced breed of super nerd! It's all rather impressive.
- Paul Waite
www.pauldwaite.co.uk
-
didn't work !!
2003-05-22 18:47:43 franzemmanuel [Reply | View]
Hello i am a french young Mac OS X owner !! I want to build my own server on my computer so I read you (please sens me your logo so that I will put it on my site web : www.artcinematographiquefrancais.com). I can go to my personal web pages with http://127 etc but when I can't when I type on IE : http://local (127 etc)/users/ etc or http://local/library/ etc... I can't access to my directory, why ? thank.
-
This is a challenge!! ungarble php4_module
2003-04-03 15:50:11 anonymous2 [Reply | View]
It seems to me that alot a people including myself have gotten this message when trying to run apache on OSX.
API module structure `php4_module' in file /usr/libexec/httpd/libphp4.so is garbled - perhaps this is not an Apache module DSO?
How can it be fixed?
-
Cannot access website from local network but can from internet
2003-04-02 06:52:05 anonymous2 [Reply | View]
I am behind a router. I type in my custom DNS domain name from local network and browser says "could not open page..." From WAN I can access my domain without a problem. What am I doing wrong? I have a D-Link DI-604 Router. Can I congigure NetInfo Manager in such a way that my loopback address is my router's IP address??
-
bbedit: Command not found
2003-03-28 00:06:24 anonymous2 [Reply | View]
I get this error whenever I try and use BBEDIT.
It worked the other day but I recently did a sys restore and now it does not.
I have bbedit lite and it works fine.
Why would I be getting the error?
bbedit: Command not found
Thanks,
Jason
-
127.0.0.1 works and localhost doesn't
2003-03-11 23:56:08 anonymous2 [Reply | View]
hi -
when i try http://localhost/, i get popup 'The attempt to load 'Accessing URL:http://localhost/' failed. i checked netinfo manager and machine->localhost ip is set to 127.0.0.1. is there something else i need to set up? thanx for any suggestions. cheers, sf
-
It works 4 Me, Super Start !
2003-03-11 19:15:01 anonymous2 [Reply | View]
I'm looking forward to PHP, SQl, ETC.
-
it works....but how about authentication
2003-02-14 07:45:01 anonymous2 [Reply | View]
...it works fine, thanx....
but i want to create a login possiblity for my webserver,
where is page 2 ?
-
Apache 2 - You Can Do!
2003-01-23 14:02:07 anonymous2 [Reply | View]
Hey Stef, and all others interested.
Check out
http://www.serverlogistics.com/apache2.php
Aweseme guy name Aaron Faby has made a great install package, and you can run Apache2 without having to uninstall version 1 (they just can't be running at the same time)
-
Apache 2 on Mac OS X?
2003-01-20 02:25:48 skuypers [Reply | View]
How can one install Apache 2 on OS X?
Cheers,
Stef
-
Serving on another volume?
2002-12-29 18:10:14 anonymous2 [Reply | View]
Hi!!
i have a bondi blue imac 233 mhz G3 with mac osx, and as you probably know osx needs to be installed within the first 8GB on the G3 imac. So when i installed my new harddrive i had to divide into two volumes.
My question is, is it possible to serve from from the "non system volume" (the big one) instead of the "system volume" (the little one) as i do now?
-
cannot access domain from outside network
2002-12-27 21:44:26 anonymous2 [Reply | View]
i have tried everything i can possibly think of, but still i cannot access my website from outside the network. it works fine from inside.
i have a fixed IP (xxx.xxx.xx.39) that, via a DSL connection, hits my UGATE Umax-plus firewall. i have this firewall set to put my computers specific IP (xxx.xxx.xx.33) as the "exposed computer", completely outside the firewall. i also have InterNIC registered my domain as the same IP (xxx.xxx.xx.33).
Apache runs fine and i have tried to set all permissions correctly. any machine on my network resolves the domain correctly and works great, but from outside the network it just hangs and eventually says cannot connect.
Do I have to set the InterNIC IP for my domain to the main fixed IP for my firewall/DSL connect? the only thing I can think of is that PacBell (my ISP) is blocking port 80 for some reason.
If anyone can offer any tips or advice I would be very grateful!
Thanks,
jeff@modaldub.net
-
ip/~username <--> 127.0.0.1/~username
2002-12-25 03:37:48 anonymous2 [Reply | View]
I can access ip and 127.0.0.1,
I can access 127.0.0.1/~username,
but I can't access ip/~username.
-
Turned on Web Sharing, getting Error 403 Forbidden at locahost/~username
2002-12-07 05:01:13 tomgreever [Reply | View]
That's basically it. I've turned on File Sharing by clicking the "Start" button in Preferences. I can load the Apache default page at http://locahost but when I go to http://localhost/~username it returns an error 403.
I have a 'Sites' folder in my username folder. Also, there is the index.html file with graphics. In fact, I can view this Apple OS X branded Apache page by opening it in Explorer.
Any ideas why I'm getting an error 403?
-
test page loads fine....but not always
2002-11-28 02:18:49 anonymous2 [Reply | View]
I loaded a test page into the main directory and my user directory....after adding the files in a variety of ways, I've the page loading fine...EXCEPT when i use the original url <www.myserver.com> . in this case, I get any earlier Index of the folder I had originally placed in thewebserve directory. This is odd because the page loads normally when I access it as http:/myserver.com or the IP address (both local and external)...but it will not load at www.myserver.com...it reverts to an outdated directory. Any ideas on how to reset this.
-
conenction to outside www
2002-11-14 00:45:03 bhavul1 [Reply | View]
I dont see any ip address in the range 209.x.x.x in my system preferences as said. I see only the local address of the pc.
Can u please help
Bhavul
-
Localhost works, 127.0.0.1 does not?
2002-10-29 16:14:21 anonymous2 [Reply | View]
When I try http://localhost my webpage is displayed. However when I try http://127.0.0.1 I get
(111) Connection refused
The same apllies when opening my user webpage:
http://localhost/~username/ works but http://127.0.0.1/~username/ does not. What gives?
HS.
-
Fix for 404 w/ 127.0.0.1/~username/
2002-10-23 11:39:01 anonymous2 [Reply | View]
Using Apache/1.3.26 (Darwin)
I had a hard time solveing this one and I saw a few other posts about it, so I thought I would pass on what I have learned.
I had a file index.html in my Users/myname/Sites folder, but when I went to 127.0.0.1/~myname/ I got a 404 error (File Not Found).
This happened because in my config.bak file the code said...
<IfModule mod_userdir.c>
UserDir public_html
</IfModule>
when it needed to say...
<IfModule mod_userdir.c>
UserDir Sites
</IfModule>
So when I overwrote my original config file with the provided config.bak I picked up this problem.
Because 127.0.0.1/~myname/ was looking for a folder named "public_html" rather than the Mac OS X default one of "Sites" as refered to in these tutorials.
So change "public_html" to "Sites" in your config file and stop and start Apache and then 127.0.0.1/~myname/ will default to your Sites folder.
-
Localhost/Proxy issues
2002-10-16 23:39:33 anonymous2 [Reply | View]
I have a problem that I can't solve. When I'm at work, my PBG4 is connected to a LAN which includes a proxy server for web and mail services and I have a Network location for these settings. When I'm at home, I use my "Remote" Network setting which doesn't use any proxies. However, IE doesn't update properly and still tries to use the proxy server from my office. Consequently, I can't access localhost. The proxy preference in IE is always greyed out and seems to be controlled by the system. Interestingly enough, as soon as I make a dial-up connection from home, IE magically turns the web proxy off. From this point on, as long as I don't quit IE, I can then access localhost.
What I want is to be able to access localhost whether I'm at work or at home without frigging with settings. I've tried the "bypass proxy for the following servers" routine and nothing works. When I type "localhost" it should go to localhost dammit!
Please help!
-
(13)Permission denied
2002-09-30 06:20:20 anonymous2 [Reply | View]
I've reinstalled 10.2.1 and have set up my httpd.conf and user.conf exactly as they were and now am getting (13)Permission denied exec of somedirs/somescript.cgi failed. SSIs work fine, ExecCGI is set for Options on pertaining Directories, and a ls -l of my cgi directory indicate correct permissions (-rwxr-xr-x). I restart Apache each time. I have copied over the httpd.conf.default a few times to start from scratch and always get the same errors.
I suspect I have not given myself the correct permission somewhere else, but where?
Any help greatly appreciated!
-
Having Problems w/ Apache 1.3.26
2002-09-29 10:15:24 anonymous2 [Reply | View]
i was advised to download Apache 1.3.26 and installed the application. still tries to start, but end up w/ this error message. please help. using jaguar upgrade.
[h000393a218ca:/Users/bushin/apache_1.3.26] bushin# apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Syntax error on line 240 of /etc/httpd/httpd.conf:
API module structure `hfs_apple_module' in file
/usr/libexec/httpd/mod_hfs_apple.so is garbled - perhaps this is not an
Apache module DSO?
/usr/sbin/apachectl restart: httpd could not be started
[h000393a218ca:/Users/bushin/apache_1.3.26] bushin#
-
Accessing MySQL in OS X
2002-09-21 21:17:54 fakeout [Reply | View]
Everytime I try to access MySQL in terminal using the command
cd /usr/local/mysql/
sudo ./scripts/mysql_install_db
sudo chown -R mysql /usr/local/mysql
sudo ./bin/safe_mysqld --user=mysql &
I get the following response in Terminal:
Installing all prepared tables
020922 0:10:05 ./bin/mysqld: Shutdown Complete
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root -p password 'new-password'
./bin/mysqladmin -u root -h dsl-216-227-33-233.telocity.com -p password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests
Please report any problems with the ./bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
[dsl-216-227-33-233:/usr/local/mysql] danwoote% sudo ./bin/safe_mysqld --user=mysql &
I don't understand. Please help.
-
Others across Internet can't access site- use Airport, Cable, and Router
2002-09-21 09:59:14 burntcrispy [Reply | View]
I found my IP address using http://checkip.dyndns.org/ but I still can't access my site, it says that a connection failure has occurred. How do Iget past this. My internet connectioncomes in through a cable modem. then to a router, then to airport, and finally to my computer running OS X.1
-
cant access /~username/
2002-09-16 22:08:07 anonymous2 [Reply | View]
how could this be?
Forbidden
You don't have permission to access /~username/ on this server.
------------------------------------------------------------------------
Apache/1.3.26 Server at emac.local Port 80
I'm username
-
still can't get apache to work
2002-09-16 16:23:05 fakeout [Reply | View]
I've 127.0.0.1 and localhost however, I cannot see the default apple page in the browser. I get a connection failure in IE 5.2 and nothing happens in Netscape, Opera, Mozilla or OmniWeb
I went to the terminal and typed httpd -t and this is the reply I recieved:
Syntax error on line 241 of /etc/httpd/httpd.conf:
Cannot load /usr/libexec/httpd/libphp4.so into server: (reason unknown)
Huh?
A little help please.
-
How access access_log file
2002-08-12 10:12:27 wsgilbert [Reply | View]
I want to setup Analog to generate reports from the log file, but I need to know how to access the access_log file from the GUI. Any suggestions?
-
Domain Names?
2002-08-12 08:26:53 hartvan [Reply | View]
Your articles have been very helpful, but how do I set up my personal Web site in OS X with a "normal" domain name (http://www.mydomain.com)? A string of numbers doesn't look too nice on a business card!
Thanks for your help.
Michael
-
Web Sharing auto-start on boot?
2002-08-09 09:27:56 redleader [Reply | View]
Web Sharing will not automatically start each time I boot my Mac. How can I make this happen
-
IP address using ADSL Router/Modem
2002-07-10 22:52:46 mrs [Reply | View]
I have seen several posts regarding ADSL connections but no really helpful answers on how to serve up pages to the internet through one. The tutorial says to locate your system IP address in the sharing panel. However, this is only the machine's local IP address (starting with 192..) I found the router's (fixed?) IP address using http://checkip.dyndns.org/ which enables me to reach my router through a browser - but how do I get past this to see pages hosted on my Apache server?
Thanks for any help.
-
How do I host my own domain?
2002-07-03 11:28:38 kbyron123 [Reply | View]
This is probably a silly question, but I can't find any instructions about how to host my domain. I purchased a domain from Network Solutions, and I have a cable connection to the internet. How do I host my domain using OS X's Apache server? It's up and running nicely thanks to these articles, but my domain isn't. How does this work?
Thanks!
-
Can't Access the Pages?
2002-06-20 18:02:31 vision619 [Reply | View]
Here's a weird one. I turned on web sharing and placed a new index file in the appropriate folder. I can access via my IP & IE through this computer but if I try via my IP from a different machine (not on this network), it doesn't seem to be able to find the site. I do not have a firewall of any kind unless one is built into OS10 which I don't know about. I have tried both the root web folder and the username web folder. Either one can be seen from outside of this computer. I am however able to run a Carracho Server from here using my IP so I know my network is operating OK? I'm stumped?
-
RE: Apache and using my IP
2002-06-19 01:51:55 hypertext2 [Reply | View]
I am coming across an issue other people here don't seem to mention. I figured I'd throw this out there and see if anyone had any ideas.
I am using an adsl pppoe connection. Let's just say that my IP address is 205.208.11.15. If I go into my httpd.conf file and set servername to that IP and restart apache I will be unable to connect to http://205.208.11.15.
The intersting thing is that the reason why it doesn't work seems to be tied in with the way PPPoe works on OS X. If I go into the Network Panel and set TCP?IP to manual and specify an IP address of 205.208.11.15, I will be able to connect to the apache server and get web pages. However, when I go back into the network panel and set tcp/ip to ppp and set up the network panel to use pppoe and connect to my adsl,the connection to the web site fails. It seems that it fails because OS X does not pay attention to the IP assigned to the ppp connection created by the pppoe software. Since the dsl connection assigns the IP to the ppp connection and not directly to the nic the computer does not realize that it is 205.208.11.15. The result is as long as I am connected to dsl, I am only able to connect using http://localhost or http://127.0.0.1.
I am wondering if anyone else has encountered this issue and what to do to fix it.
-
Can't copy files over
2002-06-18 01:33:30 happywild [Reply | View]
I set up the apache server pretty well I think with the help of these fantastic articles a month or so ago. I've just tried to copy over an existing website I'm working on into the Documents folder and it tells me the Documents folder cannot be modified. I've tried copying over single files and no go. Why is this so?? I copied over the index.html file no problems when I set up apache...
Here are the last few lines of the error log
[Tue Jun 18 16:55:40 2002] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Jun 18 16:55:40 2002] [notice] Apache/1.3.23 (Darwin) configured -- resuming normal operations
[Tue Jun 18 16:55:40 2002] [notice] Accept mutex: flock (Default: flock)
Help?!
-
Bypassing a Router?
2002-06-13 11:55:45 notaguru [Reply | View]
So if I'm running through a router and I still want to run my website off of my computer, how do I bypass the router so that others can see my website?
If you've already answered this, I apologize; I couldn't find the answer I was looking for. Thanks in advance!
-
Problems With Apache Server starting
2002-06-03 21:32:27 rdez378 [Reply | View]
When I press start up now for some reason it just says starting up but never does...
here is the error message i get after entering httpd -t in the terminal
Syntax error on line 240 of /etc/httpd/httpd.conf:
API module structure `php4_module' in file /usr/libexec/httpd/libphp4.so is garbled - perhaps this is not an Apache module DSO?
-
Running an OS X mail server
2002-05-21 15:27:53 devkun [Reply | View]
You said that it was possible to do anything OS X Server does in OS X Client. How does one go about setting up an OS X machine to run an email (pop3 or imap) server?
Thanks.
-
Excellent - Works as Described
2002-05-05 01:51:44 frankae [Reply | View]
...and agree that Wesley Crusher is a dweeb.
-
Difference Between OS X Client and Server?
2002-04-26 12:46:21 aly77 [Reply | View]
"There's a powerful Apache web server built in to every Mac OS X computer. Kevin Hemenway shows you how to start serving web pages within minutes, then he gives you the tools for advanced techniques that seasoned system administrators use every day." Is the quote at the top of one of your pages here. I thought that Apache is only built into OS X Server? Is the full version also on the client OS X? Do you know where I can find a reference to the differences (if any) between OS X Server and client?
-
what about ASPs
2002-04-23 22:04:41 millermc [Reply | View]
First of all, thanks for writing your article about Apache and the MAC OS X, it was very helpfull!
I guess my question might be answered somwhere else, but I´ll sill make it.
What about running ASPs with the Apache software that came with MAC OS X? Or where do I get more info about it?
I´m running version 10.1 on my G4.
Thanks again!
mike
-
Web sharing still won't start after update...
2002-04-23 08:49:10 addison [Reply | View]
I have updated to Mac OS 10.1.4 and found that my web sharing won't start. I've tried all the suggestions listed thus far, and my computer is unaffected. Are there any other solutions?
-
Permission, permission....please help!
2002-04-02 16:13:12 beanie [Reply | View]
Trying to test using a link from index.html to Hello.pl in an adjacent directory, cgi-bin. The script is executable and has execute permissions at three levels. No progress in a couple of weeks!
"You don't have permission to access /cgi-bin/Hello.pl on this server.".
ScriptAlias changes (and Apache restart) don't help.
-
Tips for non geeks.
2002-03-27 13:38:17 beanie [Reply | View]
a) For most of us dynamic web pages can only be tested by transfrring files to a well euipped remote ISP, a rather tedious process. The Apache server in OS X has the potential for testing dynamic pages without transferring files to an external ISP until they are debugged.
b) Get a tee-shirt that shouts "127.0.0.1". The geeks know the song about "127.0.0.1". It is the "loopback" IP which checks your own computer.
c) When a router or Airport Base Station is used the Apache server in OS X does not serve the Internet. When a hub is used the Internet is served but not the others connected to the hub.
d) When my OS X desktop Mac is directly wired to the cable modem the IP may be 68.67.138.104 and may vary each time the iMac is rebooted. It serves the Internet when not sleeping.
e) When my OS X desktop Mac is indirectly wired via the Airport the IP is 10.0.1.2 or 10.0.1.3 and it only serves itself and my PowerBook.
f) The OS X directory Library/WebServer/Documnts/ contains index.html, a file which defines the home page when /~beanie/ is not appended to the IP.
g) The /Users/beanie/Sites/ directory contains another index.html file which defines a different home page found when /~beanie/ is appended to the IP.
Beanie
-
url to my website
2002-03-21 19:02:30 woods55 [Reply | View]
Great, easy to understand, article. I have followed all of the instructions but still have one problem.
I have cable access and was told that my ip
address changes every 30 minutes ( is this dynamic?). I am also using a router.
I can get to my web page ok from this computer with my mac's ip address, but cannot from another computer over the internet.
It is my understanding that my computer is communicating with the router and the router communicates with the internet.
Is the problem with the changing ip address, my router, or something else?
Robert
-
graphics don't show??
2002-03-11 18:50:09 icerabbit [Reply | View]
Hi,
Very nice article series and right what I was looking for.
I followed the instructions and replaced the basic apache index html with a page I created, that links to a couple gifs that I placed in subfolders within the document root folder for apache.
When I preview the page with BBEdit everything is fine.
When I preview through the web the graphics are not shown?
Why would this be? And how can I solve this?
I didn't find the solution in Apache documentation.
Thanks for you help,
Frank
-
2 questions...
2002-03-06 17:04:39 sycodon [Reply | View]
Hi,
Two dumbass questions....
1. Is there a digest of this forum.
2. Is there a way to keep Apache running and serving even after Logout and another user logs in? Some way to have apaceh start and serve on startup as a system process.
Thanks...
-
Using GoLive with Apache on OS X
2002-02-25 13:26:41 mbassadork [Reply | View]
I've got my website up and running (as long as I can keep my son from putting the iMac to sleep) and would now like to use GoLive to update the site remotely. How do I configure FTP on the iMac (webserver) to allow access to a specific user/password to the website directory?
Thanks in advance!!
-
DirectoryIndex? how to change it
2002-02-02 16:17:41 twhid [Reply | View]
first, just want to say these articles are great and it's really helped me to understand the awesome power under mac's new luscious interface. great job.
my question with some strange observations.
i set a local staging site for my website using your articles and apache on osX. but my hosting service long ago insisted i name my index file as index.htm (they no longer do, but there are hard links that break if i change it to .html).
just to make sure all files are named locally as on my host server, i wanted to change the default DirectoryIndex to index.htm or simply 'index' using this wild card idea on got from apache's online docs.
but it doesn't work. i still get the nasty default directory listing when using http://127.0.01. BUT, when i used http://localhost, it worked, but in an incredibly weird way. there's a fairly fat flash file (40k) on that page and it loaded as if it was coming from a remote server over my dialup!
i was online via dialup at the time, haven't tried it while offline.
any ideas?
-
htaccess
2002-02-01 23:10:54 olt001 [Reply | View]
I bought OS X specifically to run an Apache server from my desk top. I want to use it to mirror a commerical server, also Apache.
I have two questions. How can I point to a different folder as the htdocs folder?
Second, can I run htaccess on this Apache server? If so, how do I do it.
Terry
-
me too : Cannot access username via the http://127.0.0.1/~username/
2002-01-31 23:23:23 francis_st-laurent [Reply | View]
Bonjour !
With a browser located on my Apache server machine - an iBook - I can access my “personnal” site http://127.0.0.1/~fderive/, now viewing the page that has been installed by Apple.
I cannot do so with a browser located on another machine - Mac OS 8.1 - on the same ethernet/appletalk network as the Appache server machine.
Just after start up, the command httpd -t in a terminal window says :
“[alert] httpd : Could not determine the server’s fully qualified domain name , using 127.0.01 for Servername.”
The access_log and error_log files are left with the effect of the first successful access, no more for the rest of unsuccessfull ones.
error_log :
127.0.0.1 - - [01/Feb/2002:07:12:49 +0100] "GET /~fderive/ HTTP/1.1" 304 -
127.0.0.1 - - [01/Feb/2002:07:12:50 +0100] "GET /~fderive/images/web_share.gif HTTP/1.1" 304 -
127.0.0.1 - - [01/Feb/2002:07:12:50 +0100] "GET /~fderive/images/macosxlogo.gif HTTP/1.1" 304 -
[localhost:~] fderive%
access_log :
Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/fderive.conf
[Fri Feb 1 07:00:03 2002] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Fri Feb 1 07:00:03 2002] [notice] Apache/1.3.20 (Darwin) configured -- resuming normal operations
[localhost:~] fderive%
May be this problem is already the case when I fail to connect to the Mac OS X machine from the Mac OS 8.1 - I see it in the chooser but Mac Os x admin username&password does not succeed -.
Reciprocally, connecting to the Mac OS 8.1 from the Mac OS X machine is OK.
Can you help me joining Apache club ?
-
127.0.0.1 still fails
2002-01-31 19:55:20 pablo2001 [Reply | View]
Localhost address works <file://localhost/Library/WebServer/Documents/index.html> and IP address works <http://65.96.40.195/index.html> but <http://127.0.0.1/~wmcentee/> fails. Do you have any idea which part of my system is broken?
-
Serving Pages from behind Firewall
2002-01-31 16:47:12 likorish [Reply | View]
Great tutorial guys, but I'm wondering how I might serve pages to the outside world if I'm behind a firewall? Is this possible?
-
connection failure on first use of http://127.0.0.1/~me/
2002-01-31 14:23:37 pablo2001 [Reply | View]
I'm new to this. (spoiled by GUIs on my Mac) When I try to use a browser to go to http://127.0.0.1/~me/ I get a connection failure message. Is Apache located in wrong part of my Mac?
-
Changed the index.html, now getting "forbidden" on both IP's!!
2002-01-28 11:18:44 tatlar [Reply | View]
Hi there - I liked the clear tutorial, but I have had no success viewing my new "index.html" pages. I could see the default ones just fine, but when I made my own ones, I just got the:
Forbidden
You don't have permission to access /index.html on this server.
On both the "127.0.0.1/" IP and my own IP.
Ideas?
Also, using the Terminal window, I don't get a prompt - just the welcome message. What am I doing wrong???
Cheers,
Tatlar
-
changing document root
2002-01-28 08:57:15 louabill [Reply | View]
I thought I'd try to follow the instructions, but change the document root to my Site folder. I went through the httpd.conf file, changing both occurrances of /Library/WebServer/Documents to /Volumes/etc. etc. After doing this, Apache wouldn't start.
Is this a really poor idea, or should I take some effort to figure out the solution.
Bill
-
Can access using 127.0.0.1 but not http://localhost
2002-01-26 23:02:19 liamcody [Reply | View]
I'm using OS X.1.
I've turned web Sharing on, and can access my apache server using http://127.0.0.1, but when I attempt to access it at http://localhost, Explorerer gives me a "connection failure" error.
I am connected to the Internet via a modem at the time, but that shouldn't be a problem, should it.
so, any clues?
-
Cannot access username via the http://127.0.0.1/~username/
2002-01-22 23:28:37 busboy [Reply | View]
I can access my Apache webpage via 127.0.01, but when I use the 127.0.0.1/~me
it doesn't work. I know my username is correct , but it doesn't work.
Any ideas?
-
Why not iTools?
2001-12-30 20:02:21 hanske [Reply | View]
Thank you for an inspiring article.
I just read an article in a Japanese Mac magazine that recommends iTools (from Tenon) for setting up a web server, since it "uses the world standard BIND 8.2, and makes possible a simple and correct DNS setup." But it's costly, and one gets the impression from your article that all this can be done by hand. What is your opinion on this?
-
Dumb question, I think: IP address
2001-12-28 16:22:34 dafann [Reply | View]
The IP address I see in the Sharing preferences (192.168.1.100) is the default address of my LinkSys router. That address is printed in the LinkSys manual, so it belongs to thousands of devices out there. Surely it is of no use for a personal Web site. What am I overlooking?
Thanks!
-
Ah Ha!
2001-12-22 19:19:28 stoddad [Reply | View]
Your article is a great help. I am an art professor who manages one of the few Mac labs on our campus. The university has moved all of its web to FrontPage Server. I am also responsible for my department's web and I do not find Virtual PC a very eloquent solution to maintaining the website. OS X and Apache has made it possible to serve our own web address. Until your article I had no idea how to get the ~ out of the address. Thanks!
I am interested in knowing if the OS X Apache server will allow me to have more than one static IP or name server addresses on Mac? Any hope that you will address this issue?
David Stoddard
-
great article-will you talk about sendmail & cgi forms?
2001-12-10 20:35:55 mollicat [Reply | View]
Hi;
I enjoyed the article. I have been playing with the webserver in X and am trying to learn about using sendmail & cgi to process web forms (like a user could fill out a repair/maintenance request on a web page and it would be emailed to the appropriate department.)
Sendmail is rather...intimidating. I did manage to get it halfway working but I'm still confused about the Fully Qualified Domain Names and how it uses those,since I don't have a domain name myself.
Any and all info is useful-I look forward to the rest of the articles.
-
dk = Denmark, de = Germany
2001-12-10 16:58:47 bubbasixpack [Reply | View]
I suppose it must be common to mistake all germanic languages for German - my son's potty chair has the german word: "Achtung!" for the warning, but the text underneath is Dutch. They did the opposite for the Dutch warning... Way to go Wal-Mart :P
-
Good start...
2001-12-10 13:42:49 djwudi [Reply | View]
...and I'm looking forward to the rest. I've managed to muddle some of the more advanced features (cgi, customising the httpd.conf file, and so on) for my site, but I'm sure there's bits I've overlooked, and hopefully when you touch on PHP that'll give me a jumping point to start diving into that. Thanks for the series...
-
Apache won't start
2001-12-10 06:03:44 wcostain [Reply | View]
Hi, I am running OS X on an ibook, and when I try to start web sharing, the button grays and nothing happens (ie, the button doesn't become a stop button). When I check the active processes, no httpd. Any ideas?
-
How to serve up during sleep
2001-12-10 01:43:51 dowobeha [Reply | View]
I have Mac OS X's serving up some nice stuff here on my machine at home. Unfortunately, the content's not accessible when the machine is asleep.
Is there any way around this. I don't really want to leave the machine awake all the time.
Thanks,
Lane Schwartz
los20@cam.ac.uk
-
sleeping on/off
2001-12-09 19:52:05 sryu [Reply | View]
Shouldn't the mac be kept from sleeping to
serve the web pages?
-
International
2001-12-08 17:45:32 areh [Reply | View]
An uninformed question: Shouldn't it be .de for German (instead of .dk) ?
-
configuration httpd.conf
2001-12-08 11:19:39 mcollins@kuwago.com [Reply | View]
Considering this is the O'Reilly Web site I expected this simple introduction to ramp up quickly from intro remarks to something a bit more technical. For example, mention of the file located at: /etc/httpd/httpd.conf. How about a few words on what things one might want to change at a minimum in the Apache configuration file (and what role this file plays).
-
great job again
2001-12-08 09:05:08 sssss1 [Reply | View]
I like this. I'm also waiting for the richer (geekier :) content, but this seems like a great introduction for everyone. My dad could be serving web pages with this - which is the Promise, right? Great job!
2 humble suggestions -
My dad will get hung up on the new OS X specific "/Library/directory/folder/" thing. You may want to walk people more slowly through the first time you use this.
And, please cover folder-specific password access. Please!
s
-
Perl and CGI.pm
2001-12-08 02:14:50 kenyatta [Reply | View]
the above article is fine, ok, and more or less easy to figure out. Let's get to the juice. I was able to find tutorials that explained how to build Apache (the latest build) on Mac OS X along with installling and configuring php4.0.
Hopefully some one will address perl
-
Good job
2001-12-08 00:37:13 mcamille [Reply | View]
Good job on part 1. Coming from MS's IIS, I am anxious to know more about Apache. Your introduction to Apache on OS X was very clear. I hope you can maintain that clarity when you get to how you do password authentication in Apache. I look forward to reading the next installments.
Milt Camille







Do I go up a a level and delete the site folder itself? What about the DS.Store and .localized? Do I delete them too? I have tried deleting line by line but that didn't work?
I also have a website that I have developed already and just want to upload it. It is stored locally on my Mac.
Many thanks,
T.