possible dumb osx question
- Started
- Last post
- 11 Responses
- rabattski
so i installed apache2 and php4 (mysql and myphpadmin will follow shortly). i'm running osx 10.5.1 (yeah i know, old, only thing i got here). apache2 is up and running.
now, the place for the documents is /usr/local/apache2/htdocs. fine. but the only way i can get there is thru a shell (i'm logged in as root). but i want to go there on a regular way. like writing html / php / whatever files in bbedit and saving it there. but i can't find that htdocs folder thru bbedit.
and i'm like wtf wtf wtf right now. so how do i do this? do i have to setup virtual hosts? any help / tips / resources would be appreciated a lot.
- rabattski0
ps. the webserver folder is still used by (the old) apple apache. actually. my question would be, how do i tell apache2 to point to that webserver folder?
- stewart0
10.5.1 is old??
- van_rijn0
place your docs in the library>webserver>documents
also turn on web sharing
- rabattski0
oops. sorry. that should be 10.1.5. duh. van_rijn, that's the whole problem, apple apache (standard) points to this folder (makes sense). but i installed apache2 and if i start the webserver it starts apache2 and not apache1 and thus pointing to a different folder. but i think i know how to fix it. i should edit the httpd.conf. i'll backup the new one and overwrite it with the old one. don't know if that works. doing it as i write.
- ribit0
don't you define any directory you like as the root directory by setting it in the directives in the httpd.conf file? (thats what we do on our Linux/Apache webserver...)
- van_rijn0
that might work.. while your in there, also edit in the config to make index.php as another index file
- rabattski0
yeah! that's right. changed the document root to point to /library/webserver/documents. that's working now. pfew. but now php isn't working. dablammit. i'll have to look into that.
- van_rijn0
uncomment the php lines in the config
- van_rijn0
then restart apache :)
- rabattski0
thanks van_rijn! overwriting the apache2 httpd.conf was only partially working. apache2 was running but php wasn't since apache1 wasn't configured that way. used apache2's httpd.conf again, configged it to /Library/WebServer/Documents and everything is working. trick is to also edit the /etc/hostconfig settint WEBSERVER to no (although webserver is started). this way it starts apache2 and not the old apache. woo yay! so, what's next, MySQL and MyPHPAdmin...
- rabattski0
i'm going mental. now it doesn't work anymore. like suddenly. wtf!?! you know what, i'm gonna rm -r those motherfuckers and get me the latest os x.
couple of questions though does anyone know what apache and php versions are installed with the latest os x? and since i'm booting os x from an external firewire drive i still need to be able to use startup disk, can you still choose startup disk in the latest os x?
thing is, i still work in classic and for development reasons i once in a while need php etc. so i need to boot from my firewire drive.