| Article: |
Apache Web-Serving with Mac OS X: Part 1 | |
| Subject: | configuration httpd.conf | |
| Date: | 2001-12-10 12:08:53 | |
| From: | loren3 | |
|
Response to: configuration httpd.conf
|
||
|
no doubt... i learned from this page that i had to type:
|
||
Showing messages 1 through 3 of 3.
-
configuration httpd.conf
2001-12-10 14:28:38 bbicapslock [View]
-
configuration httpd.conf
2001-12-10 13:36:09 djwudi [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-10 12:50:02 Morbus Iff |
[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 ;) ...



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.)