Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

3 votes
1 answers
3057 views
Catalina localhost ERR_CONNECTION_REFUSED
I have seen a number of threads that are close but no answer quite hit the mark for my issue. I have a MacOS AMP environment for testing that was setup using homebrew and that had been working swimmingly in Catalina since about January. Then about a month ago, after a "minor" Catalina update (and re...
I have seen a number of threads that are close but no answer quite hit the mark for my issue. I have a MacOS AMP environment for testing that was setup using homebrew and that had been working swimmingly in Catalina since about January. Then about a month ago, after a "minor" Catalina update (and resulting crash), I got ERR_CONNECTION_REFUSED when trying to access http://localhost (and 127.0.0.1 in case you are wondering about the hosts file). At the time this happened, one thread I read suggested it could have something to do with the AV software. After I uninstalled the AV software, I was once again able to access localhost. Problem solved...or so I thought. Because after the latest Catalina update, I am once again not able to access. Thing is, I never reinstalled the AV program. The MacOS firewall is off. Apache and PHP error logs are clear. $ sudo apachectl configtest Returns > Syntax OK Any other ideas? Thanks in advance.
Papa Joe Dee (131 rep)
Nov 12, 2020, 05:07 AM • Last activity: Jul 22, 2025, 02:06 AM
0 votes
1 answers
242 views
Apache (Homebrew) on macOS Monterey not reachable from network
I've installed Apache using Homebrew on a Mac Studio (M1) running Monterey and it works fine when working locally. But when I'm working on a website from a separate Ubuntu laptop, I often cannot access the website on the Mac; the request is pending. But when I now connect to the mac by SFTP and navi...
I've installed Apache using Homebrew on a Mac Studio (M1) running Monterey and it works fine when working locally. But when I'm working on a website from a separate Ubuntu laptop, I often cannot access the website on the Mac; the request is pending. But when I now connect to the mac by SFTP and navigate around, the web request suddenly succeeds as if I had to "wake up" the Mac. Maybe there's a setting to tell macOS that it should wake up on TCP requests on port 80 as it does on SSH requests?
normen (1 rep)
Nov 30, 2022, 03:14 PM • Last activity: Jun 8, 2025, 03:07 AM
0 votes
2 answers
82 views
From where does Apache get "It Works!"?
http://localhost gives me the expected "It Works!" but I cannot find that string anywhere in `/Library/Webserver/Documents` I have local copies of my two websites as subdirectories of `/Library/Webserver/Documents` but I cannot get them to show in a browser.  I have another I need to work on be...
http://localhost gives me the expected "It Works!" but I cannot find that string anywhere in /Library/Webserver/Documents I have local copies of my two websites as subdirectories of /Library/Webserver/Documents but I cannot get them to show in a browser.  I have another I need to work on before uploading. Sequoia 15.4.1 (24E263)
WGroleau (5370 rep)
May 14, 2025, 03:21 AM • Last activity: May 14, 2025, 01:23 PM
1 votes
1 answers
176 views
Apache + PHP - Internal Server Error + (13)Permission denied
Trying to get php working on my localhost. PHP has been code signed correctly and is running: >AH06662: Allowing module loading process to continue for module at /opt/homebrew/opt/php@8.2/lib/httpd/modules/libphp.so because module signature matches authority "Mo" specified in LoadModule directive Ye...
Trying to get php working on my localhost. PHP has been code signed correctly and is running: >AH06662: Allowing module loading process to continue for module at /opt/homebrew/opt/php@8.2/lib/httpd/modules/libphp.so because module signature matches authority "Mo" specified in LoadModule directive Yet, when I try to open: /phpinfo.php I run into the following error: >**Internal Server Error** >The server encountered an internal error or misconfiguration and was unable to complete your request. > >Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error. > >More information about this error may be available in the server error log. In errorlog I am seeing the following: >[Thu Oct 26 16:40:53.069155 2023] [cgi:error] [pid 3910] [client ::1:52319] AH01215: (13)Permission denied: exec of '/Users/mo/Sites/1/phpinfo.php' failed: /Users/mo/Sites/1/phpinfo.php [Thu Oct 26 16:40:53.071058 2023] [cgi:error] [pid 3910] [client ::1:52319] End of script output before headers: phpinfo.php Does (13)Permission denied mean that I need to chmod +a "_www allow execute" ... something to do with the PHP execution? macOS 14 is really making things complicated.
Mou某 (891 rep)
Oct 26, 2023, 03:44 PM • Last activity: Apr 28, 2025, 07:00 AM
1 votes
1 answers
494 views
http://localhost/~username - 403 forbidden error
I'm in the process of setting up my local ~/Sites folder, but if I access the page http://localhost/~soren I get a 403 error: Forbidden You don't have permission to access this resource. I have read several tutorials etc. on the subject, but I still can not make it work. Here are my access rights to...
I'm in the process of setting up my local ~/Sites folder, but if I access the page http://localhost/~soren I get a 403 error: Forbidden You don't have permission to access this resource. I have read several tutorials etc. on the subject, but I still can not make it work. Here are my access rights to my /Users, ~/ and ~/Sites folder: drwxr-xr-x 5 root admin 160 Aug 9 03:14 /Users drwxr-xr-x@ 64 soren staff 2048 Aug 11 05:19 /Users/soren/ drwxr-xr-x+ 9 soren staff 288 Aug 10 00:54 /Users/soren/Sites Excerpt from my /usr/local/etc/httpd/httpd.conf file: ... LoadModule authn_core_module lib/httpd/modules/mod_authn_core.so LoadModule authz_host_module lib/httpd/modules/mod_authz_host.so LoadModule userdir_module lib/httpd/modules/mod_userdir.so ... # User/Group: The name (or #number) of the user/group to run httpd as. User soren Group staff ... Options Indexes FollowSymLinks Multiviews MultiviewsMatch Any AllowOverride All Require all granted SetHandler application/x-httpd-php ... # User home directories Include /usr/local/etc/httpd/extra/httpd-userdir.conf ... I have tried two different versions of httpd-userdir.conf but none of them work. Version 1: # Settings for user home directories # # Required module: mod_authz_core, mod_authz_host, mod_userdir Include /usr/local/etc/httpd/users/*.conf RegisterUserSite customized-users /usr/local/etc/httpd/users/soren.conf: Options Indexes MultiViews FollowSymLinks ExecCGI AllowOverride None Require host localhost Access rights for soren.conf file: -rw-r--r-- 1 root admin 145 Aug 11 07:29 /usr/local/etc/httpd/users/soren.conf Version 2: # Settings for user home directories # # Required module: mod_authz_core, mod_authz_host, mod_userdir # # UserDir: The name of the directory that is appended onto a user's home # directory if a ~user request is received. Note that you must also set # the default access control for these directories, as in the example below. # UserDir Sites AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require method GET POST OPTIONS What else do I need to do to get this to work? **Edit:** Just some more information that I forgot to write. Here are my directory group rights: ls -le /Users/: 0: group:everyone deny delete ls -le /Users/soren/: 0: group:everyone deny delete
Søren Sjøstrøm (11 rep)
Aug 11, 2021, 04:36 PM • Last activity: Apr 24, 2025, 09:04 AM
0 votes
0 answers
187 views
After macOS update from 15.1 to 15.3.1 Homebrew httpd doesn't work
After updating macOS from 15.1 to 15.3.1 on my M4 Mac, I can't start Homebrew `httpd`: sudo /usr/local/opt/httpd/bin/apachectl start Password: httpd: Syntax error on line 177 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/opt/php/lib/httpd/modules/libphp.so into server: dlopen(/usr/local...
After updating macOS from 15.1 to 15.3.1 on my M4 Mac, I can't start Homebrew httpd: sudo /usr/local/opt/httpd/bin/apachectl start Password: httpd: Syntax error on line 177 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/opt/php/lib/httpd/modules/libphp.so into server: dlopen(/usr/local/opt/php/lib/httpd/modules/libphp.so, 0x000A): Symbol not found: _libssh2_session_callback_set2\n Referenced from: /usr/local/Cellar/curl/8.12.1/lib/libcurl.4.dylib\n Expected in: /usr/local/Cellar/libssh2/1.11.0_1/lib/libssh2.1.dylib It worked fine on 15.1. I use httpd on my mediawiki together with PHP 8.4.4. The PHP configuration for httpd in /usr/local/etc/httpd/httpd.conf is: LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so My PHP version: brew info php ==> php: stable 8.4.4 (bottled), HEAD General-purpose scripting language https://www.php.net/ Installed My httpd version: brew info httpd ==> httpd: stable 2.4.63 (bottled) Apache HTTP server https://httpd.apache.org/ Installed
Gerd (211 rep)
Mar 3, 2025, 08:41 AM • Last activity: Mar 3, 2025, 10:37 AM
3 votes
1 answers
404 views
Permissions keep changing on Desktop
I am running a Apache2 on my MBP on macOS 10.13.6. I setup everything well, and it works when going to `localhost/~user`. In my `~/Sites` folder, I have a symbolic link to a folder on my Desktop with my website files in it. I can navigate to the website with `localhost/~user/mysite` only sometimes....
I am running a Apache2 on my MBP on macOS 10.13.6. I setup everything well, and it works when going to localhost/~user. In my ~/Sites folder, I have a symbolic link to a folder on my Desktop with my website files in it. I can navigate to the website with localhost/~user/mysite only sometimes. If I get a 403 error, it is fixed with running chmod a+x ~/Desktop. This fixes it until about the next reload, but almost every time I make a change and try to reload the site, I have to run the chmod command. I use Brackets for my web editing, and I have iCloud Drive syncing enabled for the Desktop folder. I think that it is either the iCloud Drive resetting permissions for the folder or Brackets doing something weird. Has anyone had a similar problem and fixed it? This is really annoying and it's slowing down my development. EDIT: My httpd.conf file: pastebin EDIT: It seems my question was unclear, but what I was asking is why the permissions keep changing on my ~/Dekstop folder. I do chmod a+x ~/Desktop and it fixes my apache 403 errors, but after about a minute this changes and I have to run the chmod command again. I was thinking it might be iCloud Drive sync changing something, or Brackets messing up permissions.
Minebomber (523 rep)
Aug 31, 2018, 04:54 PM • Last activity: Jan 13, 2025, 01:03 PM
3 votes
1 answers
220 views
httpd and nfsd can not read usb external storage
Mac mini m4, macOS Sequoia apache httpd webdav nfs Both httpd and nfsd work well when I share a directory on internal storage like /Users/abc/share. When I share a directory on usb external storage like /Volumes/udisk/share, both httpd and nfsd raised errors like "can not read /Volumes/udisk/share"...
Mac mini m4, macOS Sequoia apache httpd webdav nfs Both httpd and nfsd work well when I share a directory on internal storage like /Users/abc/share. When I share a directory on usb external storage like /Volumes/udisk/share, both httpd and nfsd raised errors like "can not read /Volumes/udisk/share" and "not permitted". The exteranl storage file system is APFS. The owner user:group of /Volumes/udisk/share is abc:staff, the same as /Users/abc/share, and file mode is 777. The only difference is internal/external storage. Does accessing external storage require additional authorization? How can I resolve this issue? Any suggestions would be greatly appreciated.
nde nde (81 rep)
Dec 5, 2024, 03:14 AM • Last activity: Dec 5, 2024, 01:41 PM
1 votes
1 answers
87 views
running apache built from source sandbox access denied
I have built apache http server from source in macosx monterey. If I run from a logged in user its ok. I have created a launch daemon script in /Library/LaunchDaemons to launch it every 5 seconds with apachectl start because I have the files in USB removable drive. When launchd tries to start the se...
I have built apache http server from source in macosx monterey. If I run from a logged in user its ok. I have created a launch daemon script in /Library/LaunchDaemons to launch it every 5 seconds with apachectl start because I have the files in USB removable drive. When launchd tries to start the server I get access denied from the sandboxd while httpd is trying to read files off the USB drive. How do I get around this ?
dlsa (161 rep)
Oct 26, 2024, 03:32 PM • Last activity: Oct 26, 2024, 05:35 PM
2 votes
1 answers
496 views
How do I modify the built in web server on my M2 Mac running Sequoia
I have an M2 Mac Mini 2023. I'm running Sequoia 15.1. It has a running web server, obviously Apache, but I can't modify it because it's on a system drive. /System/Library/Templates/Data/private/etc/apache2/httpd.conf /System/Library/Templates/Data/private/etc/apache2/original/httpd.conf How can I mo...
I have an M2 Mac Mini 2023. I'm running Sequoia 15.1. It has a running web server, obviously Apache, but I can't modify it because it's on a system drive. /System/Library/Templates/Data/private/etc/apache2/httpd.conf /System/Library/Templates/Data/private/etc/apache2/original/httpd.conf How can I modify it, or indeed even stop the server running? It's refusing all commands.
Harry McGovern (805 rep)
Oct 19, 2024, 11:45 AM • Last activity: Oct 23, 2024, 06:02 AM
2 votes
1 answers
2855 views
Unable to use PHP in Apache on Big Sur
After using brew to install Apache version 2.4.46 on Mac OS Big Sur 11.2.3, and using brew to install PHP 8.0.6, I am unable to run PHP. I am running Apache from /usr/local/etc/httpd, and my Document Root is at /usr/local/var/www. I am not using the Apple supplied Apache. Here is my phpinfo.php: Her...
After using brew to install Apache version 2.4.46 on Mac OS Big Sur 11.2.3, and using brew to install PHP 8.0.6, I am unable to run PHP. I am running Apache from /usr/local/etc/httpd, and my Document Root is at /usr/local/var/www. I am not using the Apple supplied Apache. Here is my phpinfo.php: Here is my phpinfo.html: Testing PHP embedded in HTML

Testing PHP embedded in HTML

Attempting to access https://myserver/phpinfo.php displays or downloads rather than executing the PHP code. Attempting to access https://myserver/phpinfo.html displays the Title and Heading but not the PHP result. LoadModule mod_php does not appear (even commented out) in my httpd.conf file. Everything else appears to work fine. What do I need to do to enable PHP?
Herb (31 rep)
Jun 11, 2021, 12:58 AM • Last activity: Jul 5, 2024, 01:06 AM
2 votes
0 answers
931 views
How to increase open file and max processes limit for Apache Solr
I'm trying to run Apache Solr 8.8.1 on Ventura 13.0 and I get this warning: ``` $ ./solr-8.8.1/bin/solr start *** [WARN] *** Your open file limit is currently 256. It should be set to 65000 to avoid operational disruption. If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in...
I'm trying to run Apache Solr 8.8.1 on Ventura 13.0 and I get this warning:
$ ./solr-8.8.1/bin/solr start
*** [WARN] *** Your open file limit is currently 256.  
 It should be set to 65000 to avoid operational disruption. 
 If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
*** [WARN] ***  Your Max Processes Limit is currently 2784. 
 It should be set to 65000 to avoid operational disruption. 
 If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh
I've tried sudo launchctl limit maxproc 65000 4176 and ulimit -u 65000. The last command gives me the error ulimit: value exceeds hard limit. I've also tried the answers here with no luck: - https://apple.stackexchange.com/q/32235/477910 - https://apple.stackexchange.com/questions/224358/max-file-limit-conundrum - https://apple.stackexchange.com/questions/77410/how-do-i-increase-ulimit-u-max-user-processes How do I increase my limits?
Eva (121 rep)
Nov 4, 2022, 09:19 PM • Last activity: Jun 24, 2024, 04:53 PM
12 votes
3 answers
39422 views
How to start homebrew Apache on boot?
I've switched out the default apache for the homebrew version. I've stopped the default apache starting on boot with: sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist However, the homebrew version does not start automatically. The `httpd` process is running (as confirmed...
I've switched out the default apache for the homebrew version. I've stopped the default apache starting on boot with: sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist However, the homebrew version does not start automatically. The httpd process is running (as confirmed by brew services start httpd) but the server is not running, until I execute sudo apachectl start (apachectl here refers to the homebrew version at /usr/local/bin/apachectl) I'm using macOS Mojave, and the homebrew Apache version is 2.4.37.
DisgruntledGoat (541 rep)
Nov 30, 2018, 01:39 AM • Last activity: Jun 8, 2024, 12:13 PM
1 votes
0 answers
101 views
How to set up web server with Perl CGI on Catalina
I've got an old MBP that's maxed out at MacOS 10.15.7 / Catalina, and I'm trying to use it as a web server capable of running Perl CGI scripts. Furthermore, I want to serve pages from **~/Sites**; I want to run the scripts with Perl 5.38, which I've installed under my home directory with perlbrew; I...
I've got an old MBP that's maxed out at MacOS 10.15.7 / Catalina, and I'm trying to use it as a web server capable of running Perl CGI scripts. Furthermore, I want to serve pages from **~/Sites**; I want to run the scripts with Perl 5.38, which I've installed under my home directory with perlbrew; I want to access the server from another machine on my LAN (i.e., not simply a localhost-only solution). One complication is that **homebrew** no longer officially supports Catalina, so I need to avoid trying a homebrew solution, and instead use Catalina-supplied things as much as possible (apart from Perl). I've managed to find enough instructions for configuring **/etc/apache2/*** so that pages are served from **~/Sites**, and I can access them from a different machine on the LAN. I've also been able to access a Perl script, **~/Sites/hello.pl**: #!/Users/chap/perl5/perlbrew/perls/perl-5.38.0/bin/perl print ""; print ""; print "Hello, World!"; print ""; print ""; print "

Hello, World!

"; my $version = $^V; print "Perl version: $version\n"; print ""; print ""; The output, when I browse **http://retsina.local/hello.pl** , is: Hello, World! Perl version: v5.18.4 So clearly the shebang line isn't being read, and I need to tell Apache to execute **perl** from a different location. Also, once I have that working, I expect there will be a lot more gotchas when I try to execute the real Perl script, which I've developed and tested in my own home directory while logged into my shell, with my own ENV, etc. Can someone provide some guidance here? I apologize for the lack of specificity -- this is mostly black magic to me. Glad to provide more details as requested.
Chap (1316 rep)
May 7, 2024, 05:27 PM
2 votes
1 answers
3111 views
Installed Apache (httpd) using Home Brew, but cannot seem to get mod_rewrite working?
I'm running macOS 10.15 (Catalina) and have installed the latest Apache (2.4.43) using `brew`, basically following [these steps](https://tecadmin.net/install-apache-macos-homebrew/). It seems to be working OK, I can visit http://localhost/ and when I change `/usr/local/etc/httpd/httpd.conf` (e.g. di...
I'm running macOS 10.15 (Catalina) and have installed the latest Apache (2.4.43) using brew, basically following [these steps](https://tecadmin.net/install-apache-macos-homebrew/) . It seems to be working OK, I can visit http://localhost/ and when I change /usr/local/etc/httpd/httpd.conf (e.g. different port, different DocumentRoot, etc) and sudo apachectl restart, the changes are reflected in my local webserver. However I also uncommented this line in httpd.conf: LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so But putting a .htaccess file in my DocumentRoot and defining some RewriteRules there does not seem to have any effect. Already did sudo apachectl restart but no difference. mod_rewrite.so seems to be present, that is assuming that lib/httpd/modules/ in my httpd.conf refers to /usr/local/lib/httpd/modules. Am I doing something wrong? How do I enable mod_rewrite?
(edit) as reference, here are my .htaccess contents: DirectoryIndex index.php index.html Options -Indexes +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule test index.html [R=301,L,QSA] 1. I can visit http://localhost:8080/index.html, that works fine. ✅ 2. When visiting http://localhost:8080/ I get the directory index (list of files), not the index.html page as I would expect from the DirectoryIndex line. ❌ 3. When visiting http://localhost:8080/test I get 'Not Found', not the index.html page as I would expect from the RewriteRule. ❌
(edit2) For what it's worth, if I do apachectl -t -D DUMP_MODULES it shows a list of loaded modules and it includes rewrite_module.
RocketNuts (1529 rep)
Apr 13, 2020, 08:15 PM • Last activity: Jan 13, 2024, 09:01 AM
0 votes
0 answers
333 views
Homebrew httpd suddenly stopped working in Ventura. "Successfully started" but status says "stopped."
My Homebrew Apache installation randomly stopped working today. It was working up until yesterday, and I was able to access my projects via `localhost:8080`. I recently updated my OS from Monterey to Ventura 13.6.3 about two days ago. I am on Apple Silicon (MacBook Air M1 2020). I have tried restart...
My Homebrew Apache installation randomly stopped working today. It was working up until yesterday, and I was able to access my projects via localhost:8080. I recently updated my OS from Monterey to Ventura 13.6.3 about two days ago. I am on Apple Silicon (MacBook Air M1 2020). I have tried restarting httpd using brew services restart httpd or stopping and starting using brew services stop httpd and brew services start httpd. I observed that the service would "successfully start" for roughly a second before the status becomes stopped in brew services list
ron@Rons-MacBook-Air ~ % brew services start httpd
==> Successfully started httpd (label: homebrew.mxcl.httpd)
ron@Rons-MacBook-Air ~ % brew services list       
Name              Status  User       File
httpd             started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mongodb-community started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
mysql             started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
php               started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.php.plist
unbound           none               
ron@Rons-MacBook-Air ~ % brew services list
Name              Status  User       File
httpd             stopped ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mongodb-community started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
mysql             started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
php               started ronnparcia ~/Library/LaunchAgents/homebrew.mxcl.php.plist
unbound           none
I have tried solutions online such as reinstalling httpd and restoring the default httpd.conf file but this did not work. I have also updated and upgraded Homebrew already. I have also tried the launchctl unload -w command but this returns a Input/Output error. May I please ask for help in troubleshooting and resolving this issue? Please let me know if there's any additional information or output I can provide.
otu.pjr (1 rep)
Dec 22, 2023, 12:24 PM • Last activity: Dec 22, 2023, 04:02 PM
0 votes
0 answers
1353 views
Apache configuration sonoma
I can't solve this problem, apache worked fine for me then I decide to do a clean installation of sonoma and when I navigate to localhost this message appear > **Forbidden** You don't have permission to access this resource. instead when i go to the folder where html file are located and I try to op...
I can't solve this problem, apache worked fine for me then I decide to do a clean installation of sonoma and when I navigate to localhost this message appear > **Forbidden** You don't have permission to access this resource. instead when i go to the folder where html file are located and I try to open a file it works fine and I see the content in the browser. I know there are lot of topic about that but nothing seems to work here you can see my config file, maybe I am doing something wrong # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See for detailed information. # In particular, see # # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/access_log" # with ServerRoot set to "/usr/local/apache2" will be interpreted by the # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" # will be interpreted as '/logs/access_log'. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to specify a local disk on the # Mutex directive, if file-based mutexes are used. If you wish to share the # same ServerRoot for multiple httpd daemons, you will need to change at # least PidFile. # ServerRoot "/usr" # # Mutex: Allows you to set the mutex mechanism and mutex file directory # for individual mutexes, or change the global defaults # # Uncomment and change the directory if mutexes are file-based and the default # mutex file directory is not on a local disk or is not appropriate for some # other reason. # # Mutex default:/private/var/run # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 8080 Listen 80 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule my_custom_module /usr/local/libexec/mod_my_custom.so "My Signature Authority" # #LoadModule mpm_event_module libexec/apache2/mod_mpm_event.so LoadModule mpm_prefork_module libexec/apache2/mod_mpm_prefork.so #LoadModule mpm_worker_module libexec/apache2/mod_mpm_worker.so LoadModule authn_file_module libexec/apache2/mod_authn_file.so #LoadModule authn_dbm_module libexec/apache2/mod_authn_dbm.so #LoadModule authn_anon_module libexec/apache2/mod_authn_anon.so #LoadModule authn_dbd_module libexec/apache2/mod_authn_dbd.so #LoadModule authn_socache_module libexec/apache2/mod_authn_socache.so LoadModule authn_core_module libexec/apache2/mod_authn_core.so LoadModule authz_host_module libexec/apache2/mod_authz_host.so LoadModule authz_groupfile_module libexec/apache2/mod_authz_groupfile.so LoadModule authz_user_module libexec/apache2/mod_authz_user.so #LoadModule authz_dbm_module libexec/apache2/mod_authz_dbm.so #LoadModule authz_owner_module libexec/apache2/mod_authz_owner.so #LoadModule authz_dbd_module libexec/apache2/mod_authz_dbd.so LoadModule authz_core_module libexec/apache2/mod_authz_core.so #LoadModule authnz_ldap_module libexec/apache2/mod_authnz_ldap.so LoadModule access_compat_module libexec/apache2/mod_access_compat.so LoadModule auth_basic_module libexec/apache2/mod_auth_basic.so #LoadModule auth_form_module libexec/apache2/mod_auth_form.so #LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so #LoadModule allowmethods_module libexec/apache2/mod_allowmethods.so #LoadModule file_cache_module libexec/apache2/mod_file_cache.so #LoadModule cache_module libexec/apache2/mod_cache.so #LoadModule cache_disk_module libexec/apache2/mod_cache_disk.so #LoadModule cache_socache_module libexec/apache2/mod_cache_socache.so #LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so #LoadModule socache_dbm_module libexec/apache2/mod_socache_dbm.so #LoadModule socache_memcache_module libexec/apache2/mod_socache_memcache.so #LoadModule socache_redis_module libexec/apache2/mod_socache_redis.so #LoadModule watchdog_module libexec/apache2/mod_watchdog.so #LoadModule macro_module libexec/apache2/mod_macro.so #LoadModule dbd_module libexec/apache2/mod_dbd.so #LoadModule dumpio_module libexec/apache2/mod_dumpio.so #LoadModule echo_module libexec/apache2/mod_echo.so #LoadModule buffer_module libexec/apache2/mod_buffer.so #LoadModule data_module libexec/apache2/mod_data.so #LoadModule ratelimit_module libexec/apache2/mod_ratelimit.so LoadModule reqtimeout_module libexec/apache2/mod_reqtimeout.so #LoadModule ext_filter_module libexec/apache2/mod_ext_filter.so #LoadModule request_module libexec/apache2/mod_request.so #LoadModule include_module libexec/apache2/mod_include.so LoadModule filter_module libexec/apache2/mod_filter.so #LoadModule reflector_module libexec/apache2/mod_reflector.so #LoadModule substitute_module libexec/apache2/mod_substitute.so #LoadModule sed_module libexec/apache2/mod_sed.so #LoadModule charset_lite_module libexec/apache2/mod_charset_lite.so #LoadModule deflate_module libexec/apache2/mod_deflate.so #LoadModule xml2enc_module libexec/apache2/mod_xml2enc.so #LoadModule proxy_html_module libexec/apache2/mod_proxy_html.so LoadModule mime_module libexec/apache2/mod_mime.so #LoadModule ldap_module libexec/apache2/mod_ldap.so LoadModule log_config_module libexec/apache2/mod_log_config.so #LoadModule log_debug_module libexec/apache2/mod_log_debug.so #LoadModule log_forensic_module libexec/apache2/mod_log_forensic.so #LoadModule logio_module libexec/apache2/mod_logio.so LoadModule env_module libexec/apache2/mod_env.so #LoadModule mime_magic_module libexec/apache2/mod_mime_magic.so #LoadModule expires_module libexec/apache2/mod_expires.so LoadModule headers_module libexec/apache2/mod_headers.so #LoadModule usertrack_module libexec/apache2/mod_usertrack.so ##LoadModule unique_id_module libexec/apache2/mod_unique_id.so LoadModule setenvif_module libexec/apache2/mod_setenvif.so LoadModule version_module libexec/apache2/mod_version.so #LoadModule remoteip_module libexec/apache2/mod_remoteip.so #LoadModule proxy_module libexec/apache2/mod_proxy.so #LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so #LoadModule proxy_ftp_module libexec/apache2/mod_proxy_ftp.so #LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so #LoadModule proxy_fcgi_module libexec/apache2/mod_proxy_fcgi.so #LoadModule proxy_scgi_module libexec/apache2/mod_proxy_scgi.so #LoadModule proxy_uwsgi_module libexec/apache2/mod_proxy_uwsgi.so #LoadModule proxy_fdpass_module libexec/apache2/mod_proxy_fdpass.so #LoadModule proxy_wstunnel_module libexec/apache2/mod_proxy_wstunnel.so #LoadModule proxy_ajp_module libexec/apache2/mod_proxy_ajp.so #LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so #LoadModule proxy_express_module libexec/apache2/mod_proxy_express.so #LoadModule proxy_hcheck_module libexec/apache2/mod_proxy_hcheck.so #LoadModule session_module libexec/apache2/mod_session.so #LoadModule session_cookie_module libexec/apache2/mod_session_cookie.so #LoadModule session_dbd_module libexec/apache2/mod_session_dbd.so LoadModule slotmem_shm_module libexec/apache2/mod_slotmem_shm.so #LoadModule slotmem_plain_module libexec/apache2/mod_slotmem_plain.so #LoadModule ssl_module libexec/apache2/mod_ssl.so #LoadModule dialup_module libexec/apache2/mod_dialup.so #LoadModule http2_module libexec/apache2/mod_http2.so #LoadModule lbmethod_byrequests_module libexec/apache2/mod_lbmethod_byrequests.so #LoadModule lbmethod_bytraffic_module libexec/apache2/mod_lbmethod_bytraffic.so #LoadModule lbmethod_bybusyness_module libexec/apache2/mod_lbmethod_bybusyness.so ##LoadModule lbmethod_heartbeat_module libexec/apache2/mod_lbmethod_heartbeat.so LoadModule unixd_module libexec/apache2/mod_unixd.so #LoadModule heartbeat_module libexec/apache2/mod_heartbeat.so #LoadModule heartmonitor_module libexec/apache2/mod_heartmonitor.so #LoadModule dav_module libexec/apache2/mod_dav.so LoadModule status_module libexec/apache2/mod_status.so LoadModule autoindex_module libexec/apache2/mod_autoindex.so #LoadModule asis_module libexec/apache2/mod_asis.so #LoadModule info_module libexec/apache2/mod_info.so #LoadModule cgid_module libexec/apache2/mod_cgid.so #LoadModule cgi_module libexec/apache2/mod_cgi.so #LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so #LoadModule dav_lock_module libexec/apache2/mod_dav_lock.so #LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so LoadModule negotiation_module libexec/apache2/mod_negotiation.so LoadModule dir_module libexec/apache2/mod_dir.so #LoadModule imagemap_module libexec/apache2/mod_imagemap.so #LoadModule actions_module libexec/apache2/mod_actions.so #LoadModule speling_module libexec/apache2/mod_speling.so #LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule alias_module libexec/apache2/mod_alias.so #LoadModule rewrite_module libexec/apache2/mod_rewrite.so #PHP was deprecated in macOS 11 and removed from macOS 12 #LoadModule perl_module libexec/apache2/mod_perl.so LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User _www Group _www # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # definition. These values also provide defaults for # any containers you may define later in the file. # # All of these directives may appear inside containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin you@example.com # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # #ServerName www.example.com:80 # # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # blocks below. # AllowOverride none Require all denied # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/Users/marcodalmas00/Library/Mobile Documents/com~apple~CloudDocs/DevWeb" # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options FollowSymLinks Multiviews MultiviewsMatch Any # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Require all granted # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # DirectoryIndex index.html # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Require all denied # # Apple specific filesystem protection. # Require all denied Require all denied # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a # container, that host's errors will be logged there and not here. # ErrorLog "/private/var/log/apache2/error_log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a # container, they will be logged here. Contrariwise, if you *do* # define per- access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "/private/var/log/apache2/access_log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "/private/var/log/apache2/access_log" combined # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo http://www.example.com/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "/Library/WebServer/CGI-Executables/$1" # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock cgisock # # "/Library/WebServer/CGI-Executables" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # AllowOverride None Options None Require all granted # # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied # backend servers which have lingering "httpoxy" defects. # 'Proxy' request header is undefined by the IETF, not listed by IANA # RequestHeader unset Proxy early # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig /private/etc/apache2/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile /private/etc/apache2/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http://www.example.com/subscription_info.html # # # MaxRanges: Maximum number of Ranges in a request before # returning the entire resource, or one of the special # values 'default', 'none' or 'unlimited'. # Default setting is to accept 200 Ranges. #MaxRanges unlimited # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall may be used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # Defaults: EnableMMAP On, EnableSendfile Off # #EnableMMAP off #EnableSendfile on TraceEnable off # Supplemental configuration # # The configuration files in the /private/etc/apache2/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) Include /private/etc/apache2/extra/httpd-mpm.conf # Multi-language error messages #Include /private/etc/apache2/extra/httpd-multilang-errordoc.conf # Fancy directory listings Include /private/etc/apache2/extra/httpd-autoindex.conf # Language settings #Include /private/etc/apache2/extra/httpd-languages.conf # User home directories #Include /private/etc/apache2/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include /private/etc/apache2/extra/httpd-info.conf # Virtual hosts #Include /private/etc/apache2/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include /private/etc/apache2/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include /private/etc/apache2/extra/httpd-dav.conf # Various default settings #Include /private/etc/apache2/extra/httpd-default.conf # Configure mod_proxy_html to understand HTML4/XHTML1 Include /private/etc/apache2/extra/proxy-html.conf # Secure (SSL/TLS) connections #Include /private/etc/apache2/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # SSLRandomSeed startup builtin SSLRandomSeed connect builtin Include /private/etc/apache2/other/*.conf
Marco Dal Mas (1 rep)
Oct 17, 2023, 10:00 PM
0 votes
4 answers
6096 views
mcrypt for PHP 7.4 on Catalina
First of all, I was born and raised using a PC so I'm kind of new to Mac. I was hoping if someone can help me out. I'm using Catalina and trying to get the PHP extension mcrypt installed. I've been trying to use homebrew and I'm seriously stuck. I've researched this like crazy and all the forums are...
First of all, I was born and raised using a PC so I'm kind of new to Mac. I was hoping if someone can help me out. I'm using Catalina and trying to get the PHP extension mcrypt installed. I've been trying to use homebrew and I'm seriously stuck. I've researched this like crazy and all the forums are years old or using Ubuntu. I realize that mcrypt is deprecated but Laravel requires it so here I am. I installed PHP 7.4 using homebrew. I had to add a couple of path lines to my ~/.zshrc file because the terminal kept saying PHP was 7.3. I run brew install mcrypt and it downloads and "Pours" into /usr/local/Cellar/mcrypt/2.6.8. I try to update my 7.4 php.ini file with a dynamic library path. So I try adding extension=/usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so to the ini for PHP. I restart apache and I get: Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so' (tried: /usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so (dlopen(/usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so, 9): image not found), /usr/local/lib/php/pecl/20190902//usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so.so (dlopen(/usr/local/lib/php/pecl/20190902//usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so.so, 9): image not found)) in Unknown on line 0 I have no idea where to go from here. Anyone have a tip? Thanks!
cbloss793 (103 rep)
Apr 30, 2020, 07:45 PM • Last activity: Sep 6, 2023, 01:43 PM
15 votes
3 answers
28196 views
Cannot ping localhost: "unknown host" on Mac OS X El Captain
I am trying to resolve localhost which right now is "not found" if I ping localhost - I am getting ping: cannot resolve localhost: Unknown host I have made sure that the /etc/hosts file has the below entries that are necessary to have the resolution for localhost - 127.0.0.1 localhost 255.255.255.25...
I am trying to resolve localhost which right now is "not found" if I ping localhost - I am getting ping: cannot resolve localhost: Unknown host I have made sure that the /etc/hosts file has the below entries that are necessary to have the resolution for localhost - 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost However, when I ping 127.0.0.1 it is successful - PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.052 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.066 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.054 ms ^C --- 127.0.0.1 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.052/0.057/0.066/0.006 ms In doubts of this getting blocked by my antivirus - I have also disabled my "web root secure anywhere" anti-virus... and it did not solve anything. Also, I have noticed that when I restarted my machine - for the first few mins the ping localhost worked and stopped working after few mins. not sure how to track what stopped it from working. Based on the answer at https://apple.stackexchange.com/questions/26616/dns-not-resolving-on-mac-os-x?rq=1 - tried "dig @8.8.8.8 localhost" only to find that there was no "answer" section at all. localhost:~ $ dig @8.8.8.8 localhost ; > DiG 9.8.3-P1 > @8.8.8.8 localhost ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3535 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;localhost. IN A ;; AUTHORITY SECTION: . 805 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2016081801 1800 900 604800 86400 ;; Query time: 20 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Thu Aug 18 17:15:07 2016 ;; MSG SIZE rcvd: 102 As requested, the output for "ls -le@ /etc/hosts" - $ ls -le@ /etc/hosts -rw-r--r-- 1 root wheel 6126 Aug 18 17:09 /etc/hosts
Satya (291 rep)
Aug 18, 2016, 09:13 PM • Last activity: Jun 25, 2023, 08:02 PM
1 votes
1 answers
731 views
How can I solve this cakephp/cakephp 4.2.8 requires ext-intl PHP extension error on macOS?
With a MacBook Pro, I use MAMP and I believe I already have intl PHP extension [![enter image description here][1]][1] [1]: https://i.sstatic.net/doPqb.png When i am trying to update my cakephp project via composer i am getting this error - Root composer.json requires cakephp/cakephp ^4.2.8 -> satis...
With a MacBook Pro, I use MAMP and I believe I already have intl PHP extension enter image description here When i am trying to update my cakephp project via composer i am getting this error - Root composer.json requires cakephp/cakephp ^4.2.8 -> satisfiable by cakephp/cakephp[4.2.8]. - cakephp/cakephp 4.2.8 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension. Then i checked which php and result is which php /usr/bin/php I tried to use composer.phar file but still same error. How to change default php (mac os ) to MAMP?
Yogesh Saroya (141 rep)
Aug 24, 2021, 07:19 AM • Last activity: Apr 26, 2023, 05:52 PM
Showing page 1 of 20 total questions