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 250 of 335.
Next Page ![]()
-
Good job
2001-12-08 00:37:13 mcamille [Reply | View]
-
Good job
2001-12-08 07:03:21 Kevin Hemenway |
[Reply | View]
Mcamille, glad you liked the first part. When we actually do talk about authentication, we focus mostly on location-based authentication, and not password control. I'll see what I can do to throw in a few snippets about passwords and generating them, and so on and so forth.
-
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
-
Perl and CGI.pm
2001-12-08 07:00:46 Kevin Hemenway |
[Reply | View]
Kenyatta, we talk about php in a future article, yes. But what would you want to know specifically about Perl? -
Perl and CGI.pm
2001-12-10 14:07:08 cochella [Reply | View]
I would like to see info on using CPAN to install CGI.pm, libnet.pm, and DBI/DBD.
I have tried to do this and gotten stuck because the OSX Perl install is "non-standard" according to the CPAN module.
Also, with respect to PHP it would be nice to see some info on compiling PHP with different options (MySQL, PDF, XML, DOM,...) for different user/virtual host directories.
I hope this helps guide the future.
Good article! Clear, concise and it works. Many articles do not workout.
Chris -
Perl and CGI.pm
2001-12-12 09:58:55 kenyatta [Reply | View]
Specifically for Perl? Basically how to configure it for Apache, including the popular Perl module CGI.pm.
I found to useful tutorials for building and configuring PHP/MySQL for Apache on Mac OS X on hotwired.com and www.stepwise.com or (www.darwinos.com).
I've noticed that some books are being release targeting web serving using the Unix underpinnings of Mac OSX.
Thanks in advance for any information -
Perl and CGI.pm
2001-12-18 07:48:47 tmana [Reply | View]
Are you asking about mod_perl? 'Regular' Perl (including the CGI module) doesn't need to be configured for Apache. Though Apache does need to be configured to allow cgi scripts.
I don't remember the specifics off the top of my head but basically there's a SetHandler line in the Apache conf file (which I believe comes commented out...) to the effect of:
SetHandler cgi-script cgi
where 'cgi-script' tells Apache to handle anything with an extension of 'cgi' (and you can add other extensions such as 'pl') as a cgi program.
There's a couple Apache configuration books out there - including O'Reilly's - that will explain it better than me.
-
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 -
great job again
2001-12-08 09:20:31 Kevin Hemenway |
[Reply | View]
Hey sssss (ever see that snake horror flick? oh, nevermind <G>)...
Anyways, the "/Library/directory/folder/" has been in Macs for a while actually - just using a different delimiter. Were I talking in Classic/OS 7-9 lingo, this would be "Mac HD:Users:morbus:Library:directory:folder". In some geekier Classic/OS 7-9 cases, you'd actually use this - if you were coding in MacPerl, for instance, or using a Unix ported utility like cron <URL: http://gargravarr.cc.utexas.edu/cron/>. Describing it was out of the scope of this article (as is how to use the Terminal, which we start using in part 2). I've been told that O'ReillyNet is publishing an Intro to the Terminal though, so there should be no problems there.
As for the password auth access, I'll try to squeeze it in once we get into that area of our journey.
Thanks for the comments.
-
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). -
configuration httpd.conf
2001-12-08 14:14:08 Kevin Hemenway |
[Reply | View]
Yup, you can expect all that stuff in the second part, which is really the intro to that file, exploring it as we learn about CGI, and also a teensy bit about the httpd daemon itself. -
configuration httpd.conf
2001-12-10 12:08:53 loren3 [Reply | View]
no doubt... i learned from this page that i had to type:
http://<myip>/~myshortname
i had been frustrated that i was typing just http://<myip> and I was getting the apache default page even tho i had already replaced the index.html file in my ~/Sites/ folder.
so that clarified that much.
but what if you don't want to use your short name? how do you reconfigure it so that:
a) it goes straight to your user index.html file with http://myip (without having to build your site in the /Library/WebServer directory...)
or
b) create some kind of alias so that each user can have his/her own page but not necessarily use their short name to define it, as in:
http://myip/~animals (for the site owned by user "morbus") and http://myip/~cars (for the site owned by user "Joe")
thanks.....
also, is there ANY decent WYSIWYG html editor for OS X??
and... How do you use BBEDIT to create a simple go to blah link???? believe it or not I couldn't figure that out.
-
configuration httpd.conf
2001-12-10 12:50:02 Kevin Hemenway |
[Reply | View]
loren3, to answer your questions:
a) It's possible. Probably the quickest way to do so is to go into your httpd.conf file, search for "/Library/Webserver/Documents" and replace it with the full path to your user directory. When you see a line that says something like "<Directory /Library/Webserver/Documents>", then that's the place you want to change. Messing around with the httpd.conf is touched upon in later parts of this series.
b) Possible, but will not be touched upon in this series of articles. Generically speaking, the "~" is special in the sense that it denotes a username - if you really wanted "animals" and "cars" owned by separate users, then you should just do http://myip/animals/ and http://myip/cars/. That's left for you to figure out though.
As for WYSIWIGs, dunno, never used them. As for BBEdit, this is the wrong place to ask ;) ...
-
configuration httpd.conf
2001-12-10 13:20:33 loren3 [Reply | View]
- if you really wanted "animals" and "cars" owned by separate users, then you should just do http://myip/animals/ and http://myip/cars/. That's left for you to figure out though.
...sorry i can't figure that out... that's why i came here looking for clues, not being a web admin or anything.
my only guess is that you would have to set up some kind of redirect from a main page. but i don't know enough about either that level of html or about relative path names to figure that out.
i've already run into problems trying to link to images outside of the sites folder (even in the ~/Pictures/ directory!) with relative pathnames and apparent lack of privs.
-g
-
configuration httpd.conf
2001-12-10 13:36:09 djwudi [Reply | View]
Since BBEdit is 'just' a text processor, the easiest way to put a link in is to just type the HTML code for the link in. Since you added the link to go to blah link to your post, I'm assuming you know that much HTML code, so it should work fine.
Don't know about WYWIWYG editors, though - personally, I've never liked them. I've been coding my site with BBEdit, Pepper (another OS X text editor), or vi ('cause I'm a glutton for punishment) long enough that I've never liked any WYSIWYG editor I've played with.
For pages under URLs such as http://yourip/animals/ or http://yourip/cars/ and such, those would just be subdirectories within...well...
(My apologies if I'm jumping ahead in the lessons here...)
As morbus said, the url http://yourip/~yourname/ points to your /Users/yourname/sites/ directory. However, the base url http://yourip/ points to the /Library/WebServer/Documents/ directory. Creating a subdirectory called 'cars' in there would give a system path of /Library/WebServer/Documents/cars/ that would be accessible from the outside as http://yourip/cars/ and would display whatever was inside the 'cars' directory. That's the easiest way that I can think of. The user (Joe, in your example) would still have to navigate to that folder rather than having it residing in his home directory...but if you really wanted to then, I suppose some creative aliasing could take care of that. -
configuration httpd.conf
2001-12-11 15:25:50 loren3 [Reply | View]
thanks for the reply...
with regard to subdirectories issue:
1. i would want to avoid users--including myself once i got apache set up--from mucking about in the /Library directory! not a good idea IMHO.
2. i've had terrible experience with aliases when it comes to system files in OS X, such that my principle is don't do it. i created some hard symbolic links and mucked things up badly before.
3. i did find a suitable solution, which is to create an account with www.dyndns.org and set up free domain names linked to your ip (or dynamic ip). then you can set up the httpd.conf file to use virtual hosts, which is pretty easy to do. so each user can have his/her own domain name and have that go to anywhere it his/her user directory.
with regards to bbedit, yeah sure i can code a simple link. but so what? bbedit has a whole markup toolbar to do nifty things wiht GUI like inserting inline images. The one thing I can't figure out immediately is how to create a link with that toolbar.
unlike many hardcore html coders, i'd rather use dialog boxes than manually do all the tags.
-
configuration httpd.conf
2001-12-10 14:28:38 bbicapslock [Reply | View]
Straight to user index file:
Change <Directory "/Library/WebServer/Documents"> to <Directory "/Users/whatever/Sites"> ("whatever" should be replaced by your short name.)
Different users to different pages:
If it's not going to be systematic then you'll need one line for each user. One way to do it is to use alias, for example, to alias cars and Joe from your example.
You could also create some rewrite rules and let mod_rewrite take care of it.
(Check the apache doc files shipped with OSX for syntax.) -
configuration httpd.conf
2001-12-10 17:41:08 sjmagy [Reply | View]
Are you going to touch upon the .conf file that is also unique to each user?
I was working just this past weekend on setting up Apache for the very first time (following instructions from a MacWorld article). After editing httpd.conf and enabling the options I wanted, I *still* couldn't see sites ("Forbidden -- you don't have access, blah blah") even though I should have according to the conf file.
Turns out, as I was browsing around, if you have multiple users set up on your OS X box, the system creates a username.conf file for each user, which is in the etc/httpd/users directory path. If you don't also edit that file, then certain options don't get turned on, even if they are turned on in the main httpd.conf file.
Primarily, I was trying to enable "Includes" and turn off "Indexes". If I didn't edit my own username.conf file to also enable "Includes", the functionality just plain didn't work....
If you can provide some more thorough info. RE: access control, etc..., that would also be great! -
configuration httpd.conf
2001-12-10 17:48:31 Kevin Hemenway |
[Reply | View]
Sjmagy, we won't be specifically touching on the user .conf files because they don't fall into the example intranet that were building in the series. However, we will go into SSI's and turning them on, as well as access control. Modifications that we make to the httpd.conf for those features can also be entered (with no change in syntax) into your specific user .conf files.
-
International
2001-12-08 17:45:32 areh [Reply | View]
An uninformed question: Shouldn't it be .de for German (instead of .dk) ? -
International
2001-12-08 19:30:39 Kevin Hemenway |
[Reply | View]
You are correct - this is an error purely on my part. .dk is for Denmark, .de is for Germany, and .da is Danish. Also of interest is these notes from Apache's configuration file:
# Note 2: The example entries below illustrate that in quite
# some cases the two character 'Language' abbreviation is not
# identical to the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
-
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?
-
sleeping on/off
2001-12-10 07:51:54 Kevin Hemenway |
[Reply | View]
That would be correct -the Mac has to be told NOT to sleep to continue serving web pages. Thanks for reminding the readers. (For those who don't know, to do so, go to your "System Preferences", and choose "Energy Saving". From there, move all sliders to "None".)
-
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 -
How to serve up during sleep
2001-12-10 07:53:17 Kevin Hemenway |
[Reply | View]
Lane, unfortunately, I personally don't know of any way. After doing a quick search through Google and the various Mac forums as well, nothing magical popped out either. Sorry! -
How to serve up during sleep
2001-12-10 13:23:25 djwudi [Reply | View]
You do have to leave the system awake, unfortunately. I've been running a site on my OS X box (original Rev. A iMac) since the Public Beta, and I set the system and the hard drive to 'never', while setting the display to sleep after 15 minutes. That at least saves me the electricity from the monitor being on all the time.
-
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?
-
Apache won't start
2001-12-10 08:07:40 Kevin Hemenway |
[Reply | View]
Do you know how to get into your Terminal? If so, run "httpd -t". What do you get for output? What version of the OS are you running? -
Apache won't start
2001-12-10 12:02:37 egonspock [Reply | View]
I seem to have the same problem on my iBook. I get
[localhost:~] kgani% httpd -t
dyld: httpd Undefined symbols:
_apple_hfs_module
in the Terminal. Is this a common problem? My G3-desktop works flawlessly.
-
Apache won't start
2001-12-10 12:28:30 wcostain [Reply | View]
I am running 10.1.1
[wcostain:~] willardc% httpd -t
dyld: httpd Undefined symbols:
_apple_hfs_module
Seems to be the same as the other guy. -
Apache won't start
2001-12-10 12:42:37 Kevin Hemenway |
[Reply | View]
This is a common problem after updating to 10.1. There's a Apple Knowledge Base article that will explain how to fix it in depth:
http://docs.info.apple.com/article.html?artnum=106505
Unfortunately, you do need a username and a password to see this document. For a quicker explanation, check out this article:
http://www.stepwise.com/Articles/Technical/2001-09-29-01.html
It's under the "Apache breaks upon update" heading. I have to admit that I haven't run into this error myself, but the answers I've seen are solid and make sense, so things should go smoothly for you. -
Apache won't start
2001-12-10 12:01:53 loren3 [Reply | View]
i had the same problem. see recent article in macfixit os x section. i
looking at the console, i saw i was missing a file called:
/etc/httpd/httpd.conf
there was a file called:
/etc/httpd/httpd.conf.bak
i went to the /etc/httpd/ directory and duplicated the backup file as:
%sudo cp httpd.conf.bak httpd.conf
then it worked.
who knew.
-
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...
-
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 -
dk = Denmark, de = Germany
2001-12-10 17:15:02 Kevin Hemenway |
[Reply | View]
Yup, you're right, but not the first ;) ... See: http://www.oreillynet.com/cs/user/view/cs_msg/5063 - this should be fixed in the main text shortly... -
dk = Denmark, de = Germany
2001-12-12 22:40:37 jonasmunk [Reply | View]
Please don't mistake danes with germans, it makes me sad -
dk = Denmark, de = Germany
2007-01-23 08:21:43 bobga [Reply | View]
You actually shop at Walmart?
I haven't set foot in one for 5 or 6 years. Even though my neighbors say that they have the best produce in town (small town!), I won't do it and I encourage everyone I know to avoid Walmart. I was in The Hague once and heard an American tourist (which I was at the time too) ask a Dutch person if they spoke German in bad German (i.e. reading from the German <> English Dictionary). Apparently, they visited The Netherlands without understanding the history of the Dutch and the Germans.
Down with Walmart!
-
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.
-
great article-will you talk about sendmail & cgi forms?
2001-12-11 20:24:17 chet [Reply | View]
> I have been playing with the webserver in X and am > trying to learn about using sendmail & cgi to
> process web forms...
Yes, how can all the pieces (sendmail, postgres, Apache, PHP, Python, Perl, MySQL) be made to play
nicely together on OS X? -
great article-will you talk about sendmail & cgi forms?
2002-01-04 10:11:40 mr_t [Reply | View]
It would be great if they could get an article together on using sendmail with Perl.
I got so frustrated with sendmail, that I eventually used MacPerl to AppleScript to Eudora on Mac OS 9. This isn't too bad, but I'd much rather have it all run on Mac OS X.
Perhaps another article on using OS X Perl with AppleScript?
-
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 -
Ah Ha!
2001-12-24 08:26:44 Kevin Hemenway |
[Reply | View]
David,
Glad you like the articles. To answer your question, yes, you can set up Apache to listen to more than one IP address - the technique is part of something called "virtual hosting". Sadly, we won't be touching on it in our series.
To find more about virthosting with Apache: http://httpd.apache.org/docs/vhosts/index.html
-
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! -
Dumb question, I think: IP address
2001-12-29 08:41:44 Kevin Hemenway |
[Reply | View]
Sadly, I'm no networking guru, but it sounds like the Sharing preference panel is showing you the IP from the inside of your router - do you know the IP address on the outside (ie. the IP address your ISP gives you?).
Either way, until you figure that IP out, you can still use http://127.0.0.1/ or http://localhost/. -
Dumb question, I think: IP address
2001-12-30 12:57:30 dafann [Reply | View]
According to their FAQ, my ISP (Cox cable) does not allow servers on their system and will not provide static IP addresses.
However, I can still have a Web site on a university server. That might be better, anyway, considering the miserable uplink speed on cable.
Many thanks,
David Fann -
Dumb question, I think: IP address
2002-01-07 10:13:22 ngb [Reply | View]
The easiest way I've found is to point your browser at http://checkip.dyndns.org and it will return the current IP address and hostname of your router.
You can then write shell script to regularly poll for your IP address and save it on your iDisk or ftp it somewhere else. Direct people to your iDisk web site and it will refer them your desktop machine behind the router.
More details are here:
http://www.macosxhints.com/article.php?story=20011114214229220 -
Dumb question, I think: IP address
2002-01-07 08:19:50 pizzasub [Reply | View]
There are a few IP blocks that are reserved for intranet addresses; 192.168.x.x is one of them.
What this means is that that IP address is only accessible from inside your network. I've got a 192.168.1.100 inside my network, too; but I can only get to it from inside.
Make any sense? -
Dumb question, I think: IP address
2002-03-02 15:39:03 dci [Reply | View]
Because of how long it's been since your post I assume you've probably gotten this figured out, but here goes anyway...
When you authenticate to get into your Linksys router you'll see a series of tabs. Click on the status tab and look down and you'll see LAN: and WAN:. Under WAN you'll see "IP Address:". THAT's the IP address you're looking for.
DW
-
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?
-
Why not iTools?
2001-12-31 07:50:19 Kevin Hemenway |
[Reply | View]
I've actually been contacted by Tenon (the people who make iTools), and I'll be reviewing the complimentary copy they sent me. If it's good, I'll be throwing together a few words on it for the O'Reilly Network. If it's not so good, I'll be mysteriously silent ;)...
Either way, yes, everything that iTools does can be done by hand - it's just a matter of how much time you want to spend learning (and doing) it.
-
Why not iTools?
2002-01-04 01:29:03 hanske [Reply | View]
That's interesting! If one compare to HTML, I think it's safe to say that it's good to start out with simple hand coding (and simple pages) to learn what's going on, but at a certain point a visual tool starts be more practical for the lay out, and BBEdit or the like is better for polishing code, the two working in tandem.
In the case of building a Web server, is the situation the same, i.e., is it better to start out by hand, and then perhaps combine with a visual tool like iTools? In the field of UNIX networking administration on, I haven't done any more difficult task than setting up UUCP on a couple of NeXT machines, but I found it useful to gain some understanding of how the configuration files actually work, setting up permissions correctly etc.
Also, iTools do a lot of things one may not need initially, like eCommerce stuff. So perhaps hand coding is not too bad a path to tread even for a beginner, looking to set up a Web and ftp server? (I also want to do streaming QuickTime stuff) -
Why not iTools?
2002-01-04 06:50:39 Kevin Hemenway |
[Reply | View]
Well, it depends how you look at things. I can sorta agree with your HTML thing, but I *still* use BBEdit to hand code and hand design all my pages - and my first site appeared in 1997. I've never used a WYSIWIG editor for layout - may have used Photoshop once or twice to quickly jot an idea, but I never depend or trust on a WYSIWIG's ability to create what I mean.
>In the case of building a Web server, is the
>situation the same, i.e., is it better to start
>out by hand, and then perhaps combine with a
>visual tool like iTools?
Depends on the purpose or mission. If I'm building a webpage for my dog, I don't really care that it won't show in IE 3.0. But if I'm building an Amazon, then yeah, it better work in Mosaic too.
Same thing with webservers - if I'm going to build a tiny testbed for my PHP coding, or just to sample some CGI or SSI code before I make the junk live, then yeah, a visual editor will save you some time. But if you're actually going to build a webserver that needs to be good at what it does, then I definitely lean toward "learn everything there is and baby it with loving care".
-
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? -
Cannot access username via the http://127.0.0.1/~username/
2002-01-23 04:20:15 Kevin Hemenway |
[Reply | View]
Not immediately. What error message do you get? Have you messed with your Apache configuration before? Have you deleted the Sites directory from within your User folder? -
Cannot access username via the http://127.0.0.1/~username/
2002-01-30 07:16:27 agoraphone [Reply | View]
I have the same problem. I get the default apache "this is working" page, but adding /~username/ to the end gives an error 404.
The sites directory is there, with an index.html file in it. It hasn't been touched. The only thing I have touched with the whole configuration was copying httpdconf.bak over httpd.conf, since the server wouldn't start at all before I did that.
Like busboy, I'm typing the username correctly. Any clues? -
Cannot access username via the http://127.0.0.1/~username/
2002-01-31 14:30:46 Kevin Hemenway |
[Reply | View]
Unfortunately, I don't have any clues. You could send your httpd.conf to me at morbus@disobey.com, and I could take a look in there.
I have gotten spurious reports here and there of an httpd.conf file that only contains a few scant lines. A "normal" Apple supplied httpd.conf file should have hundreds and hundreds of lines. How big is yours? -
Cannot access username via the http://127.0.0.1/~username/
2002-11-09 06:25:24 hanssolmssen [Reply | View]
I have developed a similar problem. I get a 403 error in my http://127.0.0.1~username/ , but I can see the http://127.0.0.1/ site. I notice In Netinfo Manager the title of the window is local@127.0.0.1-/ (that has changed) and selecting machines then localhost or broadcasthost, the 3 items in the lower window ip_address, name and serves are grayed out. I can not select them. I did play with this after winstonford offered a way to see a site inside a airport network.
-
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? -
Can access using 127.0.0.1 but not http://localhost
2002-01-27 08:41:11 Kevin Hemenway |
[Reply | View]
I've had this happen infrequently as well, but nothing that I could pin my fingers on. Do you have any other browsers on your machine? I've found that when IE chokes, I can normally use iCab or others to open localhost with no difficulties.
-
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 -
changing document root
2002-01-28 08:59:59 Kevin Hemenway |
[Reply | View]
Your Site folder is in /Volumes? To find out what error message Apache is giving you, go to your Terminal, and type:
httpd -t
This will test your configuration file for any problems that could stop Apache from stopping. If there are any, it should spit out why. If you don't understand what it spits out, copy it into here, and I'll help you out. -
changing document root
2004-10-12 20:01:31 diad [Reply | View]
great yes I did that .. but don't understand it.
'{\rtf1\mac\ansicpg10000\cocoartf102', perhaps mis-spelled or defined by a module not included in the server configuration
(I have a question above from today about moving my httpd.config file to desktop and then back again and have apache not working now)
thanks
-
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 -
Changed the index.html, now getting "forbidden" on both IP's!!
2002-01-28 18:03:59 Kevin Hemenway |
[Reply | View]
Not really that much of a clue, actually. You only changed the index.html files, located in /Library/WebServers/Documents/? You didn't change anything else?
What do the last couple of lines in your error log say? To get that info, do the following on a command line:
tail -f /var/log/httpd/error_log -
Changed the index.html, now getting "forbidden" on both IP's!!
2002-01-30 13:54:38 tatlar [Reply | View]
Thanks for the help. The error log shows the following:
[Tue Jan 29 08:09:38 2002] [notice] Apache/1.3.20 (Darwin) configured -- resuming normal operations
statfs failed because: No such file or directory
[Tue Jan 29 12:10:29 2002] [error] [client 24.132.68.122] File does not exist: /Library/WebServer/Documents/scripts/.%2e/.%2e/winnt/system32/cmd.exe
[Tue Jan 29 15:15:04 2002] [notice] caught SIGTERM, shutting down
Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/donut.conf
Processing config file: /private/etc/httpd/users/test.conf
[Wed Jan 30 13:48:14 2002] [notice] Apache/1.3.20 (Darwin) configured -- resuming normal operations
statfs failed because: No such file or directory
[Wed Jan 30 13:48:30 2002] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Users/donut/Sites/index.html
statfs failed because: No such file or directory
[Wed Jan 30 13:50:17 2002] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /Users/donut/Sites/index.html
[Wed Jan 30 13:50:22 2002] [error] [client 132.239.153.80] (13)Permission denied: file permissions deny server access: /Library/WebServer/Documents/index.html
I have checked, and there is definitely a index.html file in the Site folder of my Users area.
Any ideas?
Cheers,
Tatlar -
Okay, figured it out....
2002-01-30 16:15:13 tatlar [Reply | View]
Okay, I think I messed up - I replaced ALL the default files with my newwebsite - I guess this threw everything out the window of Apaches default folder. After putting everything back to how it was when I first started messing around, I can now see the old website.
Sorry for the confusion.
I guess that the previous message with the error log just shows me turning web sharing off and on as I tried to figure out what was going on?
Cheers,
Tatlar -
Changed the index.html, now getting "forbidden" on both IP's!!
2002-08-09 07:41:03 mrecord [Reply | View]
I was having this same problem for a while. Then I figured out that I had to change the privileges for the items in the directory to "Read Only" (for Group and Everyone). That solved the Permission Denied problems. -
Changed the index.html, now getting "forbidden" on both IP's!!
2002-03-20 10:41:13 jaymzalgen [Reply | View]
I also get a statfs failed because: No such file or directory
in my error log, What does this mean?
It seems to happen on any page access
although everything appears to be working fine.
Here is the log:
[Wed Mar 20 13:26:07 2002] [notice] Accept mutex: flock (Default: flock)
statfs failed because: No such file or directory
statfs failed because: No such file or directory
statfs failed because: No such file or directory
-
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? -
connection failure on first use of http://127.0.0.1/~me/
2002-01-31 14:28:15 Kevin Hemenway |
[Reply | View]
Is your username "me"? Are you sure that Apache is turned on? What version of OS X do you have? What browser are you using? Are you a dialup user, or are you connected to a network? -
connection failure on first use of http://127.0.0.1/~me/
2002-01-31 14:51:43 pablo2001 [Reply | View]
Thanks for responding.
My username is not "me". I just used that to state the probblem.
I don't know if Apache is on. I did hit "start" in the web sharing panel. Was that it?
I'm using OS 10.1 and browsing with IE 5.1 browser.
I know absolutely nothing about how to tell if Apache is on.
-
connection failure on first use of http://127.0.0.1/~me/
2002-02-01 06:26:34 Kevin Hemenway |
[Reply | View]
Ok. I think I know where this is leading.
Go to a Terminal, and type "httpd -t". If you see the error message below, then it's a common problem. The URL with more information is also below.
httpd -t
dyld: httpd Undefined symbols:
_apple_hfs_module
http://www.oreillynet.com/cs/user/view/cs_msg/5087
-
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? -
Serving Pages from behind Firewall
2002-02-06 07:23:15 swanilda [Reply | View]
Has anyone answered this? I have the same problem. I have a DSL router and a dynamic address. I can access my pages within my network, but outside users can't see them. Is there any work around for firewalls/dynamic addresses?
Thanks! -
Serving Pages from behind Firewall
2002-02-23 08:46:43 chmoore [Reply | View]
Yes, it's possible.
If you're just using a firewall with public addresses inside (NOT 192.168.x.x, 172.16-32.x.x or 10.x.x.x), just set up the firewall to allow requests to port 80 through.
If you're using a NAT firewall, you have to set it up to "port-forward" requests to port 80. See your Firewall's manual for this. You'll want to set up a rule that any request for port 80 coming to the firewall's public address (e.g. 216.74.23.33) is forwarded to your web server's internal address (e.g. 192.168.1.100). That'll do it.
Another issue is that some ISPs, particularly cable companies, block port 80. This was done to stop the spread of some virus that affects Windows web servers (blech!). Since you are using a Mac, you're an innocent victim. The work-around for this is to tell people to direct their browsers to a different port with a command like: http://www.mydomain.com:8080. Then set up port-forwarding to direct requests for port 8080 to port 80 on your internal mac. How to figure out what ports are allowed through by the ISP is beyond the scope of this discussion.
C
-
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? -
127.0.0.1 still fails
2002-02-01 06:34:41 Kevin Hemenway |
[Reply | View]
What browser are you using? Try getting to that 127 address with any browser BUT Internet Explorer. Even in my own testing, I've always had random problems with IE under OS X, but if I start loading the URLs into Mozilla, Opera, or iCab, they work fine.
If that 127 doesn't work in any browser, I'll have to confess, I don't know what the issue is. I'm not a mogul of networking - I favor all the fringe extra stuff on top of the network (apache, sendmail, ftp, security, etc.)
-
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 servers 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 ? -
me too : Cannot access username via the http://127.0.0.1/~username/
2002-02-01 06:56:24 Kevin Hemenway |
[Reply | View]
The ServerName directive, as described from the Apache documentation: "The ServerName directive sets the hostname of the server; this is used when creating redirection URLs. If it is not specified, then the server attempts to deduce it from its own IP address; however this may not work reliably, or may not return the preferred hostname."
http://httpd.apache.org/docs/mod/core.html#servername
Basically, since Apache isn't getting a name, it's guessing at one, and choosing the 127.0.0.1 address, as you see in the message you copied for me. If your OS X machine has an IP address on your network, then you should use THAT as the URL to try and get to from your OS 8 machine.
When you try to get to 127 on your OS 8 machine, you're, in essence, saying "hey! I have a server on this OS 8 machine! use it!". Since that's not the case, you've got to say "hey! I have a server on my OS X machine, which is called 192.168.176.22 (example)! use it!".
-
me too : Cannot access username via the http://127.0.0.1/~username/
2002-02-03 22:54:40 francis_st-laurent [Reply | View]
80.9.14.211 - - [02/Feb/2002:12:31:33 +0100] "GET /~fderive/ HTTP/1.1" 200 6186
80.9.14.211 - - [02/Feb/2002:12:31:34 +0100] "GET /~fderive/images/macosxlogo.gif HTTP/1.1" 200 2829
80.9.14.211 - - [02/Feb/2002:12:31:34 +0100] "GET /~fderive/images/apache_pb.gif HTTP/1.1" 200 2326
80.9.14.211 - - [02/Feb/2002:12:31:34 +0100] "GET /~fderive/images/web_share.gif HTTP/1.1" 200 13370
80.9.14.211 - - [02/Feb/2002:12:35:03 +0100] "GET /manual/ HTTP/1.1" 200 5556
80.9.14.211 - - [02/Feb/2002:12:35:05 +0100] "GET /manual/images/apache_header.gif HTTP/1.1" 200 4084
80.9.14.211 - - [02/Feb/2002:12:35:05 +0100] "GET /manual/images/pixel.gif HTTP/1.1" 200 61
80.9.14.211 - - [02/Feb/2002:12:52:49 +0100] "GET /~fderive/ HTTP/1.1" 304 -
80.9.14.211 - - [02/Feb/2002:12:52:50 +0100] "GET /~fderive/images/web_share.gif HTTP/1.1" 304 -
80.9.14.211 - - [02/Feb/2002:12:52:52 +0100] "GET /~fderive/images/macosxlogo.gif HTTP/1.1" 304 -
80.9.14.210 - - [02/Feb/2002:13:40:17 +0100] "GET /~fderive/ HTTP/1.1" 200 6186
80.9.14.210 - - [02/Feb/2002:13:40:18 +0100] "GET /~fderive/images/macosxlogo.gif HTTP/1.1" 200 2829
80.9.14.210 - - [02/Feb/2002:13:40:19 +0100] "GET /~fderive/images/apache_pb.gif HTTP/1.1" 200 2326
80.9.14.210 - - [02/Feb/2002:13:40:19 +0100] "GET /~fderive/images/web_share.gif HTTP/1.1" 200 13370
80.9.14.210 - - [02/Feb/2002:14:10:50 +0100] "GET /~fderive/ HTTP/1.1" 304 -
80.9.14.210 - - [02/Feb/2002:14:20:58 +0100] "GET /~fderive/ HTTP/1.1" 304 -
80.9.14.210 - - [02/Feb/2002:14:31:26 +0100] "GET /~fderive/ HTTP/1.1" 304 -
Hello !
Any comment ?
I had forgotten I had played with a little ethernet network for which I had these Mac 0S 8.1 machines 211 and 210, the latter having an ISDN Sharing connexion to the internet.
You see everything is OK now - I *do* understand more the addressing matter !
Machines 211 and 210 can connect to 212 - not shown - which is Mac OS X machine with the Apache server.
I think I started with the address I found on the 210 machine and then I installed the same "80.9.14" on the Mac OS X machine, making it different with the last number.
Now, the Mac Os X network prefs lives with TCP/IP "Manually" - having 80.9.14.210 as Router -, or "Manually using DHCP router", in that case the address of the router is found automatically - I guess -.
That leaves other network *basic* questions...
For no rest, I checked I could connect to the Internet from 210 and 211 through 210, but did not succeeded from the 212 Mac OS X machine. That is not an Apache question.
I appreciated a lot the quality of your chirurgical explanation.
Merci beaucoup.
-
me too : Cannot access username via the http://127.0.0.1/~username/
2003-04-12 17:03:59 anonymous2 [Reply | View]
127.0.0.1 is a loopback address. It accesses the current machine you are on. Therefore, you cannot access another machine with it. To access the other machine, you have to know its IP address, which can easily be obtained by opening a DOS prompt and typing:
ipconfig /all
-
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 -
htaccess
2002-02-03 13:15:15 Kevin Hemenway |
[Reply | View]
1) To point to a different folder, it's an easy task of just changing the relevant <Directory> location within your httpd.conf file. You can find more about that in part two of the series.
2) I cover .htaccess files in the fourth part of my series (you'd do yourself well to familiarize yourself with Part Two and Three as well, which are linked to from Part 4):
http://www.oreillynet.com/pub/a/mac/2002/01/29/apache_macosx_four.html
-
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? -
DirectoryIndex? how to change it
2002-02-03 13:19:34 Kevin Hemenway |
[Reply | View]
I give specific instructions on how to change the DirectoryIndex in the fourth article, available here:
http://www.oreillynet.com/pub/a/mac/2001/12/07/apache.html
You should see absolutely no difference between 127.0.0.1 and localhost - if you do, that's insanely supremely weird.
As for your Flash file, how are your links defined within your HTML file? If they're absolute URLs (like http://www.server.com/flash.swf) as opposed to relative URLs (like /flash.swf), then yes, it would request the file from the remote server. Generally, if you want your website to be as portable as possible, you should use relative URLs as much as possible.
-
DirectoryIndex? how to change it
2002-02-04 09:17:21 twhid [Reply | View]
thanks for article four, very helpful.
re: 127.0.0.1 and localhost. it is VERY strange. i must have something screwed up somewhere in my network settings as i've been having problems networking with my pc running pcmaclan as well.
it was loading the LOCAL files as if coming from a remote server. it's kind of nice as i can check download times ;-) the files are all linked relatively and these particular files haven't even been uploaded to my remote server yet so that can't be the error. and localhost doesn't seem to resolve unless i'm connected to my dialup.
but my problem seems to have 'fixed' itself. my browsers (ie and nn6.2) now load index.htm instead of the ugly default index list. i used a wildcard because only a couple of people will be using this staging server.
thanks for your reply. thanks for this series.
-
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!!
-
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... -
2 questions...
2002-03-11 17:08:21 Kevin Hemenway |
[Reply | View]
There is no digest of this forum.
As for making it user wide, technically, enabling it in your System Preferences should do it. If it doesn't, try editing your "/etc/hostconfig" file - you'll see in a line in there that looks like "WEBSERVER=-NO-". Change that over to YES, and it should start up automatically, prior to any login.
-
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 -
graphics don't show??
2002-03-13 20:04:30 Kevin Hemenway |
[Reply | View]
More than likely, your HTML page is using absolute image links as opposed to relative image links, and thus it's getting confused when you browse it over the network/web. Take a look at the "src" of your <img> tags - what are they set for? -
My actual IMG tag HTML info
2002-03-17 16:05:24 icerabbit [Reply | View]
The URLs to the files are relative to the index.html file. (not with c:/....).
Currently there is only one image that shows and that is the apache logo in the folder manual. The others show the IE image missing placeholder/icon when browsing to index.html through the apacheserver.
Here's a couple lines from my testfile (test.icerabbit.com)
<img border="0" src="icons/i__ico_icerabbit_r.gif" align="left" width="19" height="18">
<img src="icons/PoweredByMacOSX.gif" alt="" width="160" height="44">
<img src="apache/apache_pb.gif" alt="" width="259" height="32">
Would I need to validate the subfolders in some way?
Thanks,
Frank -
My actual IMG tag HTML info
2002-03-19 14:19:38 Kevin Hemenway |
[Reply | View]
If test.icerabbit.com is your server, I don't see either the "PoweredByMacOSX.gif" OR the "i__ico_icarabbit_r.gif" in your icons folder. -
This too weird! I have 5 different icons in that folder than the ones it lists online!!!
2002-03-21 17:05:06 icerabbit [Reply | View]
Thanks for visiting that page and helping me out with this.
On my HDD, in the folder:
osx/library/webserver/documents/icons
I placed 5 files: 3 i_xxxxxx.gif files and 2 poweredbyxxxxx.gif
that's all. None of the other icons shown in the online /icons are from me or for that test page. I can't even find these icons shown in that online icons folder on my hard drive! I had hoped that would give me a clue ... but it only confuses me more ... these tiny gifs from 1996 have to come from somewhere!
So I have finder now searching for files from 02/22/96 (sigh)
Is there any firsthand location where it would pick this from? I know these gifs are not mine and are not in the apache/webserver area on my hard drive.
Thanks,
Frank
-
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
-
url to my website
2002-03-22 09:05:09 Kevin Hemenway |
[Reply | View]
Yes, a changing IP is called a dynamic IP. If you were always assigned the same IP upon connect, you'd have a static IP.
Unfortunately, that's about all I can reply to in this message. I'm a bumpkin when it comes to networking - I'm good at the stuff that runs over it ;) ...
-
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
-
Tips for non geeks.
2002-03-30 16:14:30 beanie [Reply | View]
I would bee very pleased if someone were to verfy my comments on router vs hub in sttement (c).
Beanie -
Tips for non geeks.
2002-09-03 07:13:47 joefaber [Reply | View]
Hi there... I've got a router/hub set-up connected to my DSL modem. You do have to properly configure the router's port forwarding (look at router instructions to figure out how), but it's totally possible to serve out to the internet through a hub. Needless to say, if someone has a local-only network through a hub, serving out to the internet ain't gonna happen.
-
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.
-
Permission, permission....please help!
2002-04-16 16:49:29 Kevin Hemenway |
[Reply | View]
This has been answered in some of the later articles in this series. Read on, stalwart warrior:
http://www.oreillynet.com/pub/ct/49
-
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? -
Web sharing still won't start after update...
2002-04-23 15:35:00 Kevin Hemenway |
[Reply | View]
If you get inside a Terminal and do "httpd -t", what sort of error message do you get? The "-t" is for "test syntax", and will verify that your config file is in proper working order. -
Web sharing still won't start after update...
2003-09-28 07:14:53 anonymous2 [Reply | View]
I had a similar problem I couldn't verify that web sharing was working properly even though i could see my pages on my internal LAN.
What I did was take my router out of my hardware config temporarily and did the usual steps from MAC OS X help and in this article. Then it kicked in.
Then I put everything back together and tweaked my router a bit. Hope this helps someone.
-
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 -
what about ASPs
2002-04-24 19:54:56 Kevin Hemenway |
[Reply | View]
Welp, "application service provider" or "active server pages"? If the first one, then, of course, its certainly possible. I bet you meant the second one, however, and on a default install, no, you can't. I do remember reading of a module for Apache that could under ASP, but I've no experience with it.
-
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?
-
Difference Between OS X Client and Server?
2002-04-26 18:40:00 Kevin Hemenway |
[Reply | View]
Apache and a number of other Linux applications are built into every OS X box. They're full versions (in the Linux world, there's really no such thing as "crippled", "shareware", "demo", or what have you). The benefits of OS X Server include pretty GUI frontends to most of these programs - customizing the mail and web server through pretty aqua windows. With enough effort and knowledge, everything possible via the GUI under OS X Server is possible under OS X Client. -
Difference Between OS X Client and Server?
2004-01-07 05:58:44 anonymous2 [Reply | View]
I need to migrate my existing Web site from a third party host company to my own host computer on a DSL line. I also need to operate two other Web site URLs from this machine each will be lightly used. I'm a photographer, and anticipate light traffic at the outset, but do plan to post image portfolios. Eventually, I hope to add e-commerce, but that is a long way off. The other two sites will remain lightly used (one will just refer customers to the main Web site) but all three need to Send and Receive mail).
I have four questions and would appreciate guidance:
1. To get started, can one Mac OS X computer act as both my Web server and Web site Mail server, or will I need one networked machine for each of the two tasks? I know it is more secure and improves reliability to operate separate Web and Mail Servers, and would do this later, but I need to know if I must plan for a second machine to handle mail at the outset. Is it folly to try and combine the two tasks in one Server?
2. If just one computer initially can pull dual duty (as both the Mail Server and the Web Werver), will it be difficult to migrate the mail for the thre three sites to another computer at a later time?
3. Should I use OS X Server or OS X Client for all this?
4. I have the following DSL service options. Will site visitors really notice the faster 512Mbps upload speeds for this level of usage?. Do Web hosting companies typically provide faster connections for Servers?:
512Mbps/256Mbps @ $70 per month/$0 install
1Mbps/512Mbps @ $145/$0 install
-
Excellent - Works as Described
2002-05-05 01:51:44 frankae [Reply | View]
...and agree that Wesley Crusher is a dweeb.
-
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.
-
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?
-
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!
-
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?!
-
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 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?
-
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! -
How do I host my own domain?
2002-09-26 14:33:52 philocon [Reply | View]
I know I'm late. -
If you still want me to answer your question, just notify me:
philocon@mac.com
-
How do I host my own domain?
2003-04-04 22:32:27 anonymous2 [Reply | View]
did you ever get answer to your question? i am also trying to host my own domain but don't know
where to start. help! -
How do I host my own domain?
2003-09-28 07:47:13 anonymous2 [Reply | View]
1-First thing is first, you need your own domain name. You can go to any registrar and get one (e.g Network Soultions, Register.com, registerfly.com, godaddy.com, etc.) I personally use registerfly.com because their control panel beats the pants off anything I've every seen, and they are affordable at $9.99 or sometimes less whn they hold a SALE!
2-You need to sign up with a "custom dns "service like www.dyndns.org or www.no-ip.org (I think that's their name) Follow their instructions, and they provide domain registration also if you want to roll those two processes together.
3-Point your registrar's system to the DNS services' "domain name servers" or "DNS servers" and that if done correctly will propagate in about 48 hours max (be diseminated through the Internet.)
4- Get a "DNS client" to run on YOUR server, this little app communicates back to the DNS service and let's them know what your'e current IP is if it is dynamic so they will know what to point to so your www.yourdomain.com will resolve at the right place. (You can skip this if you have a static ip and only one machine with no router/firewall-which is bizzarely unsafe.) Your DNS Client should be set to be one of your "login items" so it auto-launches at every restart.
5-If you do have a router/firewall you have to configure "port forwarding" so traffic hitting your router on port 80 (html port) will be passed on to your server's IP on your internal LAN. If your ISP blocks port 80 then you will need to route it to another port (e.g. 8080 and make sure your sever has tha port open in "network port configurations") or consult the DNS service's FAQ's they usually have a workaround.
I've been toying wih all this and I got this work for myself, now I have to work on the site...<Jeeez>
-
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. -
re: IP address using ADSL Router/Modem
2002-07-20 10:28:43 bjarnedm [Reply | View]
My personal experiences is with Cisco 677 ADSL routere. Now, some ISPs make an open door to 192.168.1.2 routing !everything! to the computer on the LAN having that address. Others block everything not requested. Even others assign different services (ports) to different loca computers on the LAN so that ftp is eg. *.*.*.3 while http is eg. *.*.*.8. Now, in case of the Cisco 677 you need to get into it's routing table!!! You do this by getting hold of a TCP program. Start it and go to the IP-address the Cisco router has on your LAN (usually *.*.*.1). You'll the be asked to log in. Do this, and the type : "show nat". This will give you the routing table of the router. You now need to connect the external IP that you have on the internet to the LAN IP-address. You do this by typing the following : "set nat entry add <local-ip> 80 <router-ip> 80 tcp". Then "write" and "exit". Now, the smart thing to do is to assing your computer a !permanent! IP-address on the LAN and !not! use DHCP. the 'D' in DHCP is for dynamic, and it's not a good idea to have a webserver that might get a new IP-address :-) -
IP address using ADSL Router/Modem
2003-04-01 16:14:46 douglasgb [Reply | View]
You've got your internet connection (cable or DSL) letting info into and out of your house. First stop is the router, which in most cases also acts as a firewall separating the inside house network from the outside rest of the world. But this barrier must be semi-permiable in order to let your internet traffic in and out of the house (so you can get your email and buy Futurama from Amazon.com). The router can do this because it has a public side (the IP you get from your ISP - maybe fixed or maybe dynamic depending on your service) as well as a private side (your machines) and it routes traffic between these two sides. When you request a site the router knows your machine's local IP and takes your request and sends it out to the world at large, but after substituting its public IP address. When the answer comes back the router forwards the reply on to your machine.
If you want to host a website you need to configure your router to route requests coming from outside to go to one of your inside machines, which (when running as a web server) will reply and send the info back out; the reverse of the process above. You need to do two things first: set up the web serving machine with a static IP address and configure the router to forward packets to that machine. Go to the IP forwarding section of your router's configuration setup and set it to allow traffic on port 80 (that's the number for http traffic) to pass through and go to your machine's local IP address. And set the local machine to have a static address so it doesn't change and have the router routing http traffic to a vacant IP address.
-
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
-
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 -
Domain Names?
2002-08-29 16:23:52 labridae [Reply | View]
When someone types in a domain name like http://www.mydomain.com, their Internet service contacts InterNIC, the organization responsible for keeping track of domain names, and gets the appropriate IP. This is how your computer actually contacts the remote computer.
So, before you can use your domain, you have to register it with InterNIC (any domain registration service will work). At this point, you can tell InterNIC what your IP address is (you should be able to manage this through the company you used to register your page) and when people type in your domain, they will be pointed at your web page.
Note: you have to have a static IP address for this to work. -
Domain Names?
2002-09-25 14:58:30 philocon [Reply | View]
You needn't have a static IP address. Look at
http://www.dyndns.org -
Domain Names?
2003-09-28 07:55:58 anonymous2 [Reply | View]
1-First thing is first, you need your own domain name. You can go to any registrar and get one (e.g Network Soultions, Register.com, registerfly.com, godaddy.com, etc.) I personally use registerfly.com because their control panel beats the pants off anything I've every seen, and they are affordable at $9.99 and sometimes less when they hold a SALE!
2-You need to sign up with a "custom DNS" service like www.dyndns.org or www.no-ip.org (I think that's their name) Follow their instructions, and they provide domain registration also if you want to roll those two processes together.
3-Point your registrar's system to the DNS services' "domain name servers" or "DNS servers" and that if done correctly will propagate(be diseminated through the Internet) in about 48 hours max.
4- Get a "DNS client" to run on YOUR server, this little app communicates back to the DNS service and let's them know what your current IP is if it's "dynamic" so they will know what to point to- so your www.yourdomain.com will resolve at the right place. (You can skip this if you have a static ip and only one machine with no router/firewall-which is bizzarely unsafe.) Your DNS Client should be set to be one of your "login items" so it auto-launches at every restart.
5-If you do have a router/firewall you have to configure "port forwarding" so traffic hitting your router on port 80 (html port) will be passed on to your server's IP on your internal LAN. If your ISP blocks port 80 then you will need to route it to another port (e.g. 8080 and make sure your sever has that port open in "network port configurations") or consult the DNS service's FAQ's they usually have a workaround.
I've been toying wih all this and I got this work for myself, now I have to work on the site...<Jeeez>
-
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?
-
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.
-
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
-
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 -
Others across Internet can't access site- use Airport, Cable, and Router
2002-09-25 14:43:46 philocon [Reply | View]
I have a similar networking setup (cable modem, router, no Airport, my machine). -
I use DNSUpdate 2 as client. Although I found my IP address I couldn't access my site until I carefully configured the client according to the author's instructions. Maybe this will help you. -
Good luck! -
For trouble accessing local host on local airport network:
2002-09-28 16:48:29 winstonford [Reply | View]
http://discussions.info.apple.com/WebX?14@7.chRHahJqeEj.12@.3bb95300/8
If you are getting "connection refused" errors while trying to reach, from within your local Airport network, no-ip.org type domains that are pointing to a local server on port 80, I have learned of 2 options:
A. set up a DNS server on the local network, behind the firewall.
or
B. Add the domain thru Netinfo Manager:
1. go into --> Utilities --> NetInfo Manager and authenticate
2. click on "machines" and then click on "localhost"
3. pulldown "Edit" to "Duplicate" and confirm "Duplicate"
4. click on "localhost copy"
5. below in the "Value(s)" column of row "ip_address" highlight "127.0.0.1" and rename to [the local ip mapped to port 80] for instance, "10.0.1.4"
6. in in the "Value(s)" column of row "name" highlight "localhost" and rename to [the domain pointing to your airport] for instance, "jetlag.no-ip.org"
7. now, up top, click back onto "localhost" (your 'localhost copy' should have been renamed to [your domain]), and then confirm the change by clickin "save" in the dialogue box and then "update copy".
8. that's it.
NOTE: choosing option A above will solve the issue for all machines on the local network, choosing option B requires that the steps be taken on EACH macine.
Also, this post is a follow up from a previous post I had where, on 10.1.5, this fix did not work for names that were domains. In 10.2 you may use domains in the name row as described above.
-
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. -
Accessing MySQL in OS X
2002-09-25 06:12:50 philocon [Reply | View]
I think I can help you using MySQL. -
I can't see where exactly the problem is. Let's identify it! -
1.Just after the installation you cd to /usr/local/mysql/
2.You type "sudo ./scripts/mysql_install_db"
STOP!
Now you see the output you don't understand. It's identical to the output I see on my screen , except for the last line which mustn't be there.[Is it possible that you took the whole instruction for one single command?]
There is not much to understand: After step 2 you have MySQL's databases installed. And that's it.
Here is how I connect to mysql:
mysql -uroot -p<password>
Good luck!
-
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#
-
(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!
-
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! -
Localhost/Proxy issues
2003-10-09 00:22:47 anonymous2 [Reply | View]
So I guess this is a bit late to help, but
the problem is that "localhost" doesn't
mean anything to IE. Some software translates
this to "127.0.0.1" as a "convenience" (which
it is until you run into something that doesn't).
When you dial in, you are probably getting DNS
service from a server that includes an entry
for "localhost"-- setting it to 127.0.0.1, the
reserved "local machine" IP address.
Enjoy the irony; your computer is asking
some server somewhere to introduce it to
itself, so it can ask itself for bits stored
on some other server somewhere.
-
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 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. -
Localhost works, 127.0.0.1 does not?
2002-11-07 05:26:50 anonymous2 [Reply | View]
Me too, exactly the same thing. Does anybody have any suggestions on this one? Thanks.
--c. -
Localhost works, 127.0.0.1 does not?
2003-01-28 10:53:40 smoore [Reply | View]
If you use an http proxy then make sure that you've entered 127.0.0.1 in the "bypass proxy settings" edit box at the bottom of the "Proxies" tab in Network Preferences -
Localhost works, 127.0.0.1 does not?
2003-01-28 17:16:51 petemay [Reply | View]
How does a proxy server get into the picture here? I thought that requests to the 'loopback' address of 127.0.0.1 didn't ever leave the network card (completely local). How is it that the proxy is causing this? Is this something that the administrator of the proxy can configure to change?
And since 'localhost' resolves to 127.0.0.1, why does that address work?
Thanks!
PM -
Localhost works, 127.0.0.1 does not?
2003-08-11 22:47:55 anonymous2 [Reply | View]
edit your httpd.conf file. replace all instances of localhost with 127.0.0.1
i needed to do this to allow cookies to be set properly and referrer as well for dev purposes. loacalhost will no longer be recongnized but for my purposes i never use localhost anyway.
hth
regards,
dan
-
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
-
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.
-
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? -
Turned on Web Sharing, getting Error 403 Forbidden at locahost/~username
2003-05-09 04:18:25 anonymous2 [Reply | View]
I had the same problem and realised that I'd set my home to no access for anyone apart from me. If you've done the same, get info on your home and set it to read for everyone, otherwise the webserver can't then see into your Sites folder.
Roman
www.applepro.co.uk
-
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.
-
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
-
cannot access domain from outside network
2003-05-05 00:21:58 anonymous2 [Reply | View]
You're correct, your router is filtering the connections coming in for port 80. You can set your router to forward connections for port 80 to the internel IP of the machine hosting the webserver. You might also try disabling the filter, which in most cases is difficult to properly and safely do. Refer to your routers manual, or contact manufactuerer.
-
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?
-
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
-
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)
-
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 ?
-
It works 4 Me, Super Start !
2003-03-11 19:15:01 anonymous2 [Reply | View]
I'm looking forward to PHP, SQl, ETC.
-
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 -
127.0.0.1 works and localhost doesn't
2003-04-02 04:11:39 anonymous2 [Reply | View]
type in:
http://localhost/~[username]/
of course, replacing the [username] with yours!
as well, if you have a html file called index.html put into your Sites folder, this will be what comes up when you go to your root localhost directory as written above, otherwise a directory listing of your folders and files in Sites will show up in your browser -
127.0.0.1 works and localhost doesn't
2003-05-31 09:09:21 anonymous2 [Reply | View]
I have an additional question. Replacing the index.html in //localhost/~(tilde)username "sites" by my on website as well as replacing the content of library/Websites/documents gives me a 403 forbidden.
I put my website up to the server with Fetch from a Powerbook within the network and otherwise by drag and drop from within the same disc. Nothing worked. Now I can't replace the backup files. Any idea what I'm doing wrong? I don't want to go to the terminal and destroy my whole system or Apache, because I'm very new to this.
I'm working on a Dual 1000, OSX 10.2.6, behind a router, within a network of four Macs. IE 5.2 shows me my complete machine when calling localhost.
My name is Wolf Dresp. I'm calling from Germany.
-
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 -
bbedit: Command not found
2003-03-28 00:52:52 anonymous2 [Reply | View]
OK fixed my problem
I dloaded bbedit 7.0 (demo) when you start it up for teh first time it asks if you want to install the current command line functions.
I prolly did not select that the first time.
It now works great.
So I gues you cannot use bbedit lite :(
-
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?? -
Cannot access website from local network but can from internet
2003-06-05 08:43:21 anonymous2 [Reply | View]
I have a similar problem. From another computer on my LAN, I can access the web server. But oddly enough, when I type in it's private IP, 127.0.0.1 or localhost.. it does not work. It's exasperating.
It works without the router.......... maybe I'll smash it to bits.
-frl -
Cannot access website from local network but can from internet
2003-07-07 16:27:33 anonymous2 [Reply | View]
DNS is your address for the web
localhost will work without internet services.
if you cant access your site from the web ie typing in your DNS.
1 your routers ports maybe closed
2 your nat for your router could be configured wrong
3 your server might not be started
from the sound of what you are saying you routers DMZ host might not be correct. On your mac you will use the DMZ host ip address as your network ip address in the preferences pane
-
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?
-
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.
-
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
-
feedback
2003-08-27 08:58:57 anonymous2 [Reply | View]
You're a great writer. Very clear and helpful.
-
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. -
running a site without an internet connection
2003-10-18 03:51:37 anonymous2 [Reply | View]
simple, put the site into the documents folder. /Library/WebServer/Documents/ so that the index is at the root of this folder. Then start websharing via the control panel... job done. Test it by entering http://127.0.0.1/ in a web browser on the same machine.
It may be that you want to run PHP, you can download a package installer from http://www.entropy.ch/software/macosx/ -
running a site without an internet connection
2003-10-21 22:13:24 anonymous2 [Reply | View]
Actually there is no need to install PHP its already there you just need to enable it. search for " Restoring the Apache config file after 10.2.4 update" on www.macosxhints.com and read the reader comments. Many will say why not just read the tutorials that tell you how to edit the httpd.conf file to enable it. Beacuse I have done that and everytime you upgrade the system you have to do it again. The reader comments explain how to create an overide.conf so it will stay enabled even after you update your system. If you are a little command line nervous and didn't want to go the path above you can search on www.versiontracker.com for "CompletePHP" You will be taken to Aaron Faaby (sic) website where he has complied click installers with control panels to install and control PHP, MYSQL, Tomcat and even Apache.
Just throwing out some more options.
Good Luck Hope this helps
-
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 -
Configuring Apache
2003-11-01 08:49:41 anonymous2 [Reply | View]
Hi Marc,
I ran into exactly the same problem. I solved it by following the instructions for enabling php in Part III of Configuring Apache:
http://www.macdevcenter.com/pub/a/mac/2002/01/04/apache_macosx_pt3.html
There are several lines in the /private/etc/httdp/httpd.conf file concerning php that need to be un-commented.
Best regards,
Konrad
-
'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
-
'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
-
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 -
can view site on LAN but not WAN???
2003-12-09 15:50:38 anonymous2 [Reply | View]
It could also be a "permissions" problem.
Did you set "read only" access for "others" for the Library/WebServer/Docments folder?
I think it should be the default but it sometimes gets messed up. -
can view site on LAN but not WAN???
2004-01-09 05:26:15 anonymous2 [Reply | View]
What is the IP of the hosting computer? If it is a 'private' IP (192.x.x.x or 10.x.x.x) then it will not route through the router until you do port mapping from the public IP to that individual private IP. -
can view site on LAN but not WAN???
2004-01-22 16:04:16 rh416 [Reply | View]
...And how would one do that?
Thanks -
can view site on LAN but not WAN???
2004-02-20 08:37:42 dmcole [Reply | View]
You need to alter the Network Address Translation (NAT) system, which is on the router that bridges the outside world to your LAN. Get the manual for that router and search through it for NAT and you'll find the specific instructions for that router on how to set up NAT.
-
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 -
problems starting web sharing
2005-08-19 21:16:08 dreamingkat [Reply | View]
you can't start web sharing if there are errors in httpd.conf
If you haven't changed httpd.conf ever, then copy the httpd.conf from another mac os x computer. The .bak and .default files on my mac are for unix computers - they tell apache to look in public_html instead of Sites and have not been customized for os x.
-
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!
-
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.
-
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!
-
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
-
router setup/manual IP
2004-07-08 08:37:08 guzzler [Reply | View]
I'm having the very same problem :( I tried out the articles last night. All was well. This morning when I rebooted all my problems started. I followed instructions from art. 1-4 related to Jaguar and 5 and 6 from the earlier series coz i just couldnt wait! And now i've got the internet back but when i click on personal web sharing it gets stuck at starting... also i can no longer see my local site from the Sites folder and not from the Webserver/Documents folder.. Any help will be highly appreciated since the computer i've been fiddling around on is not mine!! :( -
router setup/manual IP
2004-12-13 07:23:26 pezster [Reply | View]
I am having the same problem with my Belkin router. From outside of the home I can't get to the website running on my machine. I am using a tool called noip.com which allows me to redirect the DHCP address to the internet. I always get the main router page. Have you fixed this issue?
Thanks.
-
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 -
Apache doesn't start anymore
2004-10-12 19:53:07 diad [Reply | View]
ya duh, I did the same thing. Any luck getting an answer to this problem? I was trying to add a directory to my config file so GoLive would know where to place the site folder.It doesn't work if you change the permissions again.
Mine never says it's starting, just stays gray. And I see that I copied my httpd file back from my desktop to etc (it asked me to authenticate when I did) and now it's there without .config at the end. -
Apache doesn't start anymore
2004-10-14 14:47:33 diad [Reply | View]
Oh hey I figured it out. You can't drag it from your desktop back to the etc folder. Instead you have to go to the terminal and type:
sudo cp ~/Desktop/httpd.conf /etc/httpd/httpd.conf
I got this from Swanilda: http://swanilda.com/unix5.html
Don't know if it works but it makes total sense. I will try it now. -
Apache doesn't start anymore
2005-04-06 15:20:08 raechyl [Reply | View]
I'm having pretty much the same problem. I opened httpd.conf in TextEdit because Terminal gave me an error when I tried BBEdit. Of course I realized I couldn't save it in the httpd directory, but instead of being a little more brilliant and saving it to the desktop, I tried using sudo pico /etc/httpd/httpd.conf in Terminal. I made the changes and then I couldn't restart Apache. Then I tried using the above advice, but with the backup file of httpd.conf that I had made. Unfortunately, that didn't work. I really hope people are still checking this because this is a time-sensitive question. Any ideas? -
Apache doesn't start anymore
2005-08-19 21:06:09 dreamingkat [Reply | View]
you can get more information on why apache isn't restarting by using the terminal to restart it. Try "sudo apachectl graceful". (the command is apachectl (apache control), the option is graceful, and sudo means "hey os x, pretend I'm god and can do whatever I want for a few minutes". You'll have to enter your login password and be in the admin group for this to work.)
-
Apache doesn't start anymore
2006-06-21 09:49:48 balijewel [Reply | View]
I use mac osx 10.4.6, intel chip. I have the same problem with you, plus my system preferences/sharing/personal web sharing check box is off. I try this command: sudo apachectl graceful and here is the answer: sudo: apachectl: command not found
Anybody can help me? Thanks, Deni
-
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?
-
Acually I think it might be a permissions problem
2004-11-19 03:43:16 CrazyPsyRoller [Reply | View]
Ah update....I now know the server will accept html....the real problem is something to do with permissions....it opens up index.html or index.php but whenever I click on a link I always get the forbidden error telling me I dont have permission to access the file...
please please someone help, I really dont know what to do.... -
Acually I think it might be a permissions problem
2004-12-08 11:56:20 Drachentöter [Reply | View]
I think you have turned on FileVault right? The process of enableing FileVault cause a change of the permission setting of your home directory - I do not know why this havens? But if you start your terminal then go to your home directory and enter "chmod 755 ~" then it is working again and well.
-
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?
-
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?
-
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?
-
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.. -
Access to the sites
2005-04-05 14:41:58 kathryne [Reply | View]
<< 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. >>
Hey......no question is a dumb question, especially when you're first setting up and getting started doing your own webserver. I'm having some problems too and basically I feel like I'm out on a desert posing questions which I can never get answers to...not only on this forum, but on other forums as well. I've read on how to setup in the "Mac OS X, the Complete Reference Manual," but it's of little help. Apple needs to put up some websites with step-to-step visual instructions on how to host and get your website to be seen by others. This is very exasperating! Hope you find answers to your questions.
-
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.
-
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
-
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
-
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. -
Outgrown hard disk space-How to overcome it
2005-06-22 19:37:44 Jagil [Reply | View]
Use a symbolic link. You can create one in terminal using the 'ln' command:
Do this:
Type 'cd ' (notice that space at the end) and then drag and drop you website root folder from the finder into the terminal window then press return.
Type 'ln -s newImageFolder ' then drag and drop where your new image folder is on the other hard drive. Press return.
That should have created a symbol link called 'newImageFolder' and when you open that in the finder, it should go over to the new image folder if itis working correctly.
-
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 -
I'm not sure ....
2005-07-27 01:17:56 randallz [Reply | View]
Hey Mike,
There are a few IP addresses to consider.
In your home there is an IP address for each computer attached to your Belkin router, as well as one for the configuration page of the router itself.
Let's say your computer is 192.168.2.25, another computer at home is 192.168.2.26, and you get the configuration page by going to 192.168.2.1.
Your cable modem, or whatever you use to connect to the internet, has another IP address according to the outside world. Everything on your home network has this same IP as far as the outside world, and it is up to your router to sort or properly ROUTE all traffic from outside.
So, your computer thinks it's address is 192.168.2.25, the same address that you get in the System Prefs web sharing panel. However, http://www.whatismyip.com/
will report back to your real address according to the outside world. (Note, that this is not the same as the IP address for configuring your router)
For the sake of illustrating this, you can go to another computer on your home network and confirm that you get the same answer from Whatismyip.com.
So how does everything keep from getting confused? The router is essentially a small computer. When you type in an address, a request for data to be sent to your x.x.x.25 IP address is sent out. The router rewrites this to the real/outside IP address, then when the request is filled and the data begins to roll in it routes it to the same computer it knows asked for the data.
It is different when you are the website. Setting up the router to send all port:80 requests to the computer at x.x.x.25 makes all requests sent to your real/outside IP address will be forwarded to your computer.
I hope that makes sense, and that I didn't misunderstand your question.
If you'd rather not require people to memorize a changing IP address, you can also find free services that will forward a more conventional text-url to your computer.
eg. http://www.dyndns.com/services/dns/dyndns/
-Randall







Milt Camille