How to setup the webserver (particularly for 10.9 onwards)?
  • Useful tips at:
  • sudo apachectl start
    sudo apachectl stop
    sudo apachectl restart
    apachectl -t # to check the validity of httpd.conf
  • If you encounter issues, don't forget to have a look at: /var/log/apache2/error_log
  • Under /private/etc/apache2/users/ there must be file named: <username>.conf. If it doesn't exist, sudo create it:
    <Directory "/Users/<your short user name>/Sites/">
    Options Indexes MultiViews
    AllowOverride None Order allow,deny
    Allow from all
  • Your user dir might also need the uncommenting of the following lines in /etc/apache2/httpd.conf & in the file /private/etc/apache2/extra/httpd-userdir.conf
    LoadModule userdir_module libexec/apache2/
    Include /private/etc/apache2/extra/httpd-userdir.conf
    Include /private/etc/apache2/users/*.conf
  • For using CGI, uncomment also the line:
    LoadModule cgi_module libexec/apache2/
  • Default location of the base index.html.en or index.html is: /Library/WebServer/Documents/
-- ErkcanOzcan - 28 Jun 2015
Topic revision: r1 - 28 Jun 2015, ErkcanOzcan

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback