Questions tagged [apache]

The popular open-source Web server application, an implementation of which is included in macOS.

Filter by
Sorted by
Tagged with
19
votes
3answers
54k views

How to turn Mac OS X Lion into a web server?

After using MAMP for ages, I found out I could actually use Snow Leopard's built-in Apache server. Now that I've upgraded to Lion, I have no idea how to do this anymore. Do you know how to turn my ...
12
votes
2answers
7k views

Enabling Apache in Mac OS X Mountaion Lion

This is my first Mac, it's Mountain Lion, and I know how to enable Apache through Preferences -> Sharing -> Web Sharing, but how the hell do I do it in Mountain Lion? I find that that button no ...
4
votes
2answers
3k views

Run script before restart/shutdown

Is it possible to execute a script/command right before OS X is shutting down or restarting? I'd like to run sudo apachectl stop to stop apache from auto-starting.
14
votes
5answers
17k views

Apache2 (Httpd) not working after update to High Sierra

I have an issue where Apache will not start after updating to High Sierra 10.13.1. There isn't anything showing in the error logs, but when I try to apachectl start nothing happens. If I run ...
26
votes
5answers
20k views

How do I get my user directory working for web sharing again?

I had web sharing enabled in Lion and a web site at http://localhost/~user, where user is my User directory. When I upgraded to Mountain Lion, web sharing (Apache) remained enabled and I can go to ...
7
votes
3answers
18k views

PHP not working after upgrading to OS Mojave

When i try to open localhost it gives me 403 error message like this "You don't have permission to access / on this server." I have tried changing the permission but nothing happens. It worked fine ...
5
votes
5answers
21k views

Apache on MacOS Sierra: AH00557: httpd: apr_sockaddr_info_get() failed for Macbook-Pro.local AH00558: httpd: Could not reliably determine…

I updated MacOS Sierra's Apache and PHP, and now whenever I $ sudo apachectl restart I get this: AH00557: httpd: apr_sockaddr_info_get() failed for My-MacBook-Pro.local AH00558: httpd: Could not ...
2
votes
4answers
8k views

El Capitan Safari can't open http://localhost/ after starting Apache

In the Terminal window, I started the web server with sudo apachect1 start, supplied the password and then got: /System/Library/LaunchDaemons/org.apache.httpd.plist: service already loaded Then, ...
2
votes
1answer
263 views

Configure the OS X Server from .pkg postinstall script

I make a .pkg-installer for a product that extends the Apache server in OS X. From the postinstall script in the .pkg I'm currently able to configure the default setup of Yosemite and El Capitan, by ...
11
votes
4answers
14k views

How to find out what launch agent or daemon is starting a process

After installing Autodesk Smoke, I have two httpd processes running all the time, and I'd like to stop them. When I use sudo killall httpd, they stop and are restarted right away. Activity Monitor ...
8
votes
15answers
36k views

Apache not working with user Sites folder on macOS 10.13 High Sierra

I have followed this guide to set-up Apache on High Sierra: https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/ I used it to set it up on Sierra. But ...
2
votes
2answers
3k views

Cannot connect to server “localhost”?

I've been developing web apps for several months now on my mac using the built in apache server and everything has been fine. I restarted my mac this morning and now when I try to connect to anything ...
5
votes
2answers
24k views

Reinstall/restore Apache httpd in OS X

How to reinstall or restore Apache httpd in OS X? I want to do that because I deleted httpd.conf file (both /etc/apache2/httpd.conf and the original at /etc/apache2/original/httpd.conf).
3
votes
1answer
4k views

Configuring OS X 10.7 Lion Server to serve Rails Apps via Apache

I have a number of Rails Apps working just great under Snow Leopard, but would like to migrate these to Lion. However, like many others, the rug has been pulled from under my feet by the changes that ...
3
votes
1answer
2k views

macOS apache installs on different directory with homebrew, how to start/stop?

Im strugling to understand different installations of apache on macOS. As i now can say i have two installations of apache2 one in /private/etc/apache2 ->this one seams to be installed by default with ...
4
votes
1answer
8k views

After MacOS High Sierra install, localhost fails and apache has syntax errors

After upgrading to MacOS High Sierra, I haven't been able to access my localhost. I tried restarting Apache, but it still didn't work. So I did apachectl configtest and got this error message: ...
3
votes
1answer
7k views

How to activate mod_rewrite on MacOSX Lion

I tried to activate the mod_rewrite module in the httpd.conf, but I do not succeed to make it work. I'm running Lion, and my goal is to do URL rewriting in ~USER/Sites/mysite Can someone help me ...
1
vote
2answers
15k views

Apache 2 `UserDir` problem in OS X Mountain Lion (10.8) Server after upgrade from Lion (10.7)

I had a Mac under OS X Lion. I upgrade it to Mountain Lion, and buy the OS X Server software in the AppStore. Since the beginning, I use the Apache version bundled in Mac OS, and it work fine. But ...
0
votes
1answer
1k views

Mac apache not working - apachectl configtest errors

I'm trying to get off of MAMP and run local versions of an AMP stack on my Mac, but when I try to start apache and run localhost from a browser, it's not coming up with anything. In running apachectl ...
3
votes
3answers
2k views

How do I set which Apache / PHP 10.6 should run?

All my problems stemmed from trying to get mcrypt for PHP installed. Last night I gave in and followed a tutorial of how to do a totally fresh apache2 and php5.3.3 install. I did this using MacPorts. ...
3
votes
3answers
6k views

Mac OS X Server 10.6.7: Disable Apache?

I'm doing some Rails dev, and I'm trying to get Pow running. After making the appropriate symlink, if I try to go to idealm_web.dev/ (idealm_web being the name of my Rails project), I get this: I was ...
2
votes
1answer
1k views

Web Sharing (Apache) won't turn on in Lion

I'm unable to enable web sharing via System Preferences > Sharing. When I click it to turn it on the light turns yellow but then goes back to gray. I did some Googling and found that many people ...
2
votes
1answer
779 views

macOS Sierra: Configuring Subversion/SVN on Apache

Every Mac OSX/macOS update brings further challenges to get svn working after the update. Sierra's the latest. I have a subversion repo in ~/svnRepo I run some windows development stuff in a VM ...
1
vote
2answers
36 views

Cannot get httpd to listen on port 80

I installed httpd using brew. I edited /usr/local/etc/httpd/httpd.conf and changed: Listen 8080 to: Listen 80 Restarted the service: brew services restart httpd But Apache's still listening on ...
1
vote
1answer
157 views

Fix permissions in Apache

I'm trying to use the built-in Apache server in MacOS mojave. In my browser, accessing http://localhost/~myusername/mypage.html (in case of user dir) or http://localhost/mypage.html (in case of ...
1
vote
3answers
6k views

Apache permissions

I'm trying to get LAMP working on OSx Lion and am having a little trouble. Have Apache, MySQL, and PHP set up and working just fine. Have turned on "Website" under sharing in Settings. Removed the ...
1
vote
1answer
518 views

Does Apache require special settings to run a command?

I am trying to create an image using Bio::Perl/Bio::Graphics and implement it on my webserver. However, whenever I am trying to run my scripts online, the command line does not respond to run my ...
1
vote
1answer
539 views

Apache VirtualDocumentRoot, MAMP, .local domain & xip.io?

I have a problem making xip.io works. I have set up my machine to use virtualhosts with MAMP .local domain name. this is my httpd-vhosts.conf file: NameVirtualHost *:80 UseCanonicalName Off <...
1
vote
0answers
843 views

How do I switch which instance of php is used on my Mac?

I have three installed versions of php on my Mac. When I check using phpinfo() via a web browser, the one that is being invoked is version 5.3.15. I would like to switch it to the installed instance ...
0
votes
1answer
562 views

Trying to turn on localhost on Sierra made my Mac unable to connect to internet

Background I recently upgraded to macOS Sierra, but couldn't see the typical "it works" page on the local host. I followed some instructions online, first I did the following to my httpd.conf file: ...