Web Server

mw84

Registered
I'm not sure if this is in the right section because it's not really just a software question.

Anyway, I want to set up a webserver on my mac. First of all is this possible, I've seen software like this http://www.dslwebserver.com/main/fr_index.html?/main/main.html

If it is possible what is the easiest way of going about it? Basically I want it so the webserver will run on this computer which will be always switched on until I sort something more permenant out. It's only going to be hosting a personal website with some html pages, possibly some php scripts and images so the issue of sometimes having to turn this computer off temporarily shouldnt be a big issue anyway.
 
(On Panther) Open System Preferences, go to the 'Sharing' pane under 'Internet & Network', check the box next to 'Personal Web Sharing'. Congrats, Apache 1.3 is now running.

The root folder for the server is: /Library/Webserver/Documents/

If you type http://localhost in your browser window, that's where the page you see is coming from.

Additionally, each user of the machine has a site folder. It's located in /Users/username/Sites If you type http://localhost/~username in your browser, you'll see that page.



Is the machine you're going to run this behind a switch/hub/router? That'll be a minor issue which is pretty easy to resolve, especially if you have a newer router...there should be a setting in it's config file to send requests for port 80 to a specific IP on your LAN. Some routers (DLink) even have built-in settings for dynamic IP services, which you'll need if you have a dynamic IP addy from your ISP. It basically checks with the service every so often, making sure that they know what you IP is. No need for running programs on the machine itself.
 
Ok, I have my webserver up and running. Now ! does anyone know how I go about running php scripts on it? I checked through the apache search engine but there's such a mass of relivant and irrelivant stuff in there, I thought I'd ask someone instead.
 
Nevermind ! :D I found a super cheap host instead 99p a month. Anyway i've uninstalled mysql to the best of my knowledge but not php, could not uninstalling these correctly or at all be a possible security problem? I disabled web sharing.
 
Turn off web forwarding on your router (if you use one), turn off web sharing. Those are the big ones.

Did you install php in the first place? It's included by default with OS X - at least, I have it on my machine, and I never installed it.
 
Back
Top