Friday, March 28, 2014

OS X 10: Create and host a simple HTML webpage on Apache and access from an iPad, non-Mac user friendly

You don't need Goodreader, Diet Coda, or anything fancy. Just follow the steps below.

  1. Open the Terminal (/Applications/Utilities/Terminal)
  2. Type whoami to see your username
  3. Then type sudo pico /etc/apache2/users/(your username).conf (unless it's already there)
  4. Paste this:
    <Directory "Users/(your username)/Sites/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all </Directory>
  5. Save and close by hitting Ctrl + O and Ctrl + X
  6. Create the folder /Users/(your username)/Sites/ and drop a test HTML file in there (Terminal: cd ~ then open .)
  7. In the Terminal enter sudo apachectl start (sudo apachectl stop to stop it)
  8. Open Safari and go to http://localhost/~ - it should display your test page
  9. Open Network and check the machine's IP address
  10. On the iPad, open Safari and go to http://(your IP address):80/~
See here or here if you encounter any problems when trying to run the server etc.


No comments:

Post a Comment