
Once you make the Sites folder you will notice that it has a unique icon which is a throwback from a few versions older. You need to make a “ Sites” folder at the root level of your account and then it will work.

This takes a bit longer to set up but some users are very accustomed to using it. The other web root directory which is missing by default is the ‘ ~/Sites’ folder in the User account. The files are shared in the filing system at – /Library/WebServer/Documents/ – the default system document root is still found at – It is easier to use the user level one as you don’t have to keep on authenticating as an admin user. It seems there is less effort from Apple in continuing with the user level one but it still can be set up with a couple of extra tweaks in configuration files. This will give you an indication of what might be wrong.ĭocument root is the location where the files are shared from the file system and is similar to the traditional names of ‘ public_html‘ and ‘ htdocs‘, OSX has historically had 2 web roots one at a system level and one at a user level – you can set both up or just run with one, the user level one allows multiple accounts to have their own web root whilst the system one is global for all users. If you don’t get the localhost test, you can try troubleshooting Apache to see if there is anything wrong in its config file by runningĪpachectl configtest – Important to check configured properly or not The Apache version that comes in OSX Yosemite is Apache/2.4.10Īfter starting Apache – test to see if the webserver is working in the browser – – you should see the “It Works!” text. This needs to be done in the Terminal which is found at /Applications/Utilities/Terminalįor those not familiar with the Terminal, it really isn’t as intimidating as you may think, once launched you are faced with a command prompt waiting for your commands – just type/paste in a command and hit enter, some commands give you no response – it just means the command is done, other commands give you feedback – lets get to it…. Their is no GUI to toggle Web Sharing on or off in OSX 10.10, which was previously a GUI option in System Preferences way back in 10.7, but fear not Apache is installed ready to be fired up. AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'ĭo I need to enable cgi in /etc/apache2/users/walter/nf? Should I? AH00163: Apache/2.4.25 (Unix) PHP/5.6.30 configured - resuming normal operations AH00169: caught SIGTERM, shutting downĪH00112: Warning: DocumentRoot does not exist AH00096: removed PID file /private/var/run/httpd.pid (pid=75403) NOTE: I will eventually need to deploy this on a server where I won't have access to the apache2 directory. Restarted Apache sudo apachectl restart.

In etc/apache2/nf I enabled LoadModule cgi_module libexec/apache2/mod_cgi.so.

I can't get the python script to execute on localhost. I am trying to create a python script (widget.py) that will get a JSON feed from an arbitrary resource.
