Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

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
3 votes
1 answers
5687 views
Localhost has stopped working on Chrome and Safari since upgrading to Big Sur - how do I get this to work again?
I use localhost to develop Wordpress websites locally but since upgrading to BigSur, I cannot get localhost to show my local websites. My set up is MacBook Pro with Big Sur v11.4. I use MAMP software v6.3 for my local server environment I have tried to open local websites on Safari 14.1.1 and Chrome...
I use localhost to develop Wordpress websites locally but since upgrading to BigSur, I cannot get localhost to show my local websites. My set up is MacBook Pro with Big Sur v11.4. I use MAMP software v6.3 for my local server environment I have tried to open local websites on Safari 14.1.1 and Chrome Version 91.0.4472.101 There's been brief intermittent success in an incognito Chrome Window and in Safari when I first tried to use localhost:8888 but that was only when I was able to use http and not https (when unsuccessful it redirects to https: and fails). With MAMP running... When I type 'localhost' in either browser - I get "it works!" '**https://localhost:8888**' returns On **Chrome**: "This site can’t provide a secure connection localhost sent an invalid response. ERR_SSL_PROTOCOL_ERROR" On **Safari**: "Safari can't open the page "https://localhost:8888" because Safari can't establish a secure connection to the server localhost" I try to type in http only but it always redirects to https: in both browsers When I use an **incognito window in Safari** - the website displays as expected but In **Chrome incognito** - it returns "This site can’t provide a secure connection localhost sent an invalid response. ERR_SSL_PROTOCOL_ERROR" It seems like it's **https:** causing a problem but I don't know if that's a correct assumption or how to fix it. Can anyone help to identify the problem and how to fix please as it's really impacting my ability to work. I have asked Apple for support but as it's not clear where the issue lies they haven't really taken this on as their problem.
Beknowin' Snr (31 rep)
Jun 16, 2021, 06:37 PM • Last activity: Apr 16, 2025, 11:09 PM
1 votes
1 answers
168 views
How to make a Mac run a docker container on start up without a password but prevent people from accessing the UI without a password
I am trying to make my Mac behave similarly to a linux server, I want the Mac to start on its own when plugged in, launch a docker container for a web server without any user input. However, I don't want anybody to be able to plug a monitor into the Mac and then access the desktop UI without a passw...
I am trying to make my Mac behave similarly to a linux server, I want the Mac to start on its own when plugged in, launch a docker container for a web server without any user input. However, I don't want anybody to be able to plug a monitor into the Mac and then access the desktop UI without a password. So far I have only been able to remove the password on log in so the Mac automatically logs in and starts the web server, but then anybody can just plug a screen and use the Mac without a password. Is there a way to make it behave similarly to a linux server where it just starts on its own, runs all the backgrounds tasks but then if somebody tries to use it with a keyboard and mouse it will ask for a password ?
kasimolo33 (21 rep)
Feb 20, 2025, 03:59 PM • Last activity: Feb 26, 2025, 09:42 AM
27 votes
7 answers
48345 views
Can I use a MacBook as a server with the lid closed?
I have an old MacBook laying around, and I wonder if it's possible to use it safely when the lid is closed? I want to run it as a network device, store files in my home network on it etc. Is there a way to use it just plugged in to power and ethernet, close the lid and let it run as a server?
I have an old MacBook laying around, and I wonder if it's possible to use it safely when the lid is closed? I want to run it as a network device, store files in my home network on it etc. Is there a way to use it just plugged in to power and ethernet, close the lid and let it run as a server?
ohboy21 (6042 rep)
Mar 12, 2021, 06:32 AM • Last activity: Jan 10, 2025, 06:52 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
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
3 votes
3 answers
90 views
Upgrading High Sierra to Catalina on 2016 MBP using local webserver
In the past colleagues (and I) believed it was often a bad idea to install newer OSs on older Macs. I get the feeling that has changed, and that putting Catalina on my 2016 MacBook Pro shouldn't be a problem. What I'm wondering about is whether my local webserver will survive the upgrade. I have Apa...
In the past colleagues (and I) believed it was often a bad idea to install newer OSs on older Macs. I get the feeling that has changed, and that putting Catalina on my 2016 MacBook Pro shouldn't be a problem. What I'm wondering about is whether my local webserver will survive the upgrade. I have Apache/MySQL/PHP set up in the same approximate manner as we were told to do this years ago - sites running in /Library/WebServer/Documents, custom hosts and httpd-vhosts.conf files in /private/etc and so on. In past os upgrades and moves to new machines it's been necessary to re-set-up all that, which isn't a huge problem but also not a lot of fun. In the past it helped that I was migrating to a new machine, so I had access to my whole old setup and could do things like export MySQL databases from the old and import into the new. This time I'm thinking about upgrading my existing machine so I won't have easy access to a backup while I'm doing this. I hate the thought of buying a new machine just so I can upgrade the OS. On the other hand this is my work machine and it's 4 years old (and has a dead speaker) so perhaps it's time to bite the bullet. Any of you experienced migrators have an opinion about which way I should go?
Bob Meador (165 rep)
Nov 23, 2020, 02:08 AM • Last activity: Sep 6, 2024, 08:02 PM
0 votes
1 answers
90 views
Cannot access web app on LAN when hosted on mac
I have a web app on port 3333 on my mac os (ventura). This mac has a static internal network IP (`192.168.1.234`). I want to access this web app from another machine on the. LAN via `192.168.1.234:3333`. When I hit that url from another machine, the address never resolves and gets stuck loading. Str...
I have a web app on port 3333 on my mac os (ventura). This mac has a static internal network IP (192.168.1.234). I want to access this web app from another machine on the. LAN via 192.168.1.234:3333. When I hit that url from another machine, the address never resolves and gets stuck loading. Strangely, I also have ssh access to that mac hosting the web app. The instant I ssh into that mac from the same machine that is trying to load 192.168.1.234:3333, this address resolves and a get access to the web app. ## update I don't even need to ssh **from that same machine** that is trying to access the web app. I can access the mac from another machine on the same LAN. It seems like this is "waking up" the mac to resolve the web app So for some reason ssh into the machine also opens up the web app address in the brower 1. **why is that ?** 2. how can I access the web app without having to first ssh? The mac does not have a firewall enabled in place. So I am not sure what is blocking the access.
bcsta (121 rep)
Mar 19, 2024, 03:59 PM • Last activity: Mar 19, 2024, 04:22 PM
1 votes
0 answers
91 views
How to turn on MacBook automatically when it receives power again (and battery was drained)?
I would like to use my old MacBook Air (2015) as a server-like machine so that I can connect remotely to it via SSH. I managed to do this, however, I am looking forward how to be able to power it on automatically when there would be a power outage. I want to accomplish the following things: 1. If th...
I would like to use my old MacBook Air (2015) as a server-like machine so that I can connect remotely to it via SSH. I managed to do this, however, I am looking forward how to be able to power it on automatically when there would be a power outage. I want to accomplish the following things: 1. If the system is overloaded, restart automatically (perhaps this would be unlikely, but just in case) 2. If there is a power outage, and the battery drains too, when the electricity is back, turn the machine on again and login automatically. How can I do this?
Ionică Bizău (1285 rep)
Mar 13, 2024, 09:46 AM
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
11 votes
4 answers
16661 views
Has anyone ever tried to use an iPhone as web server?
Yeah, it makes no sense to use an iPhone as web server, although the hardware could be used in some interesting ways if this would be possible. You could, for example, set up the iPhone to send a phonecall or SMS with pre-recorded message to someone who, for example, send his phonenumber through it'...
Yeah, it makes no sense to use an iPhone as web server, although the hardware could be used in some interesting ways if this would be possible. You could, for example, set up the iPhone to send a phonecall or SMS with pre-recorded message to someone who, for example, send his phonenumber through it's web interface to be included in it's address book. Again, it's not very useful, but it would be cool to be able to communicate with an iPhone-based web server. Who knows? Maybe someone does come up with a practical purpose for this!
Wim ten Brink (211 rep)
Aug 21, 2009, 05:38 PM • Last activity: Aug 29, 2023, 09:35 PM
2 votes
1 answers
910 views
Why can I not ping anything other than localhost:8080/?
I cannot ping any other address on the localhost other then the base directory (i.e, when i run `ping localhost:8080/example`, it will not work). I have also confirmed that the addresses will work in a browser. I have also made sure that the firewall settings will allow this. I have tried the follow...
I cannot ping any other address on the localhost other then the base directory (i.e, when i run ping localhost:8080/example, it will not work). I have also confirmed that the addresses will work in a browser. I have also made sure that the firewall settings will allow this. I have tried the following: 1. ping localhost:8080/example 2. ping localhost/example 3. ping 127.0.0.1/example 4. ping 0.0.0.0/example (When trying this I switched the bind address to 0.0.0.0) 3. ping 127.0.0.1:8080/example 4. ping 0.0.0.0:8080/example (When trying this I switched the bind address to 0.0.0.0) All of these commands result in the same error: cannot resolve : unknown host My hosts file:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
How do I ping anything other the localhost?
inyourface3445 (123 rep)
Mar 22, 2023, 02:58 PM • Last activity: Mar 22, 2023, 05:14 PM
0 votes
0 answers
602 views
Apache mod_rewrite not work
I am can enable mod_rewrite in Apache, in logs we can see error: /Users/rustam/Documents/www/laravel/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration My virtual host in file in `/etc/apache2/extra/httpd-vhosts.conf`...
I am can enable mod_rewrite in Apache, in logs we can see error: /Users/rustam/Documents/www/laravel/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration My virtual host in file in /etc/apache2/extra/httpd-vhosts.conf DocumentRoot "/Users/rustam/Documents/www/laravel/public/" ServerName laravel.loc DirectoryIndex index.php Options Indexes MultiViews FollowSymlinks AllowOverride All Order allow,deny allow from all Require all granted ErrorLog /Users/rustam/Documents/www/vhosts/logs/laravel_errors.log In config file /etc/apache2/httpd.conf I am uncommented module mod_rewrite, and also set AllowOverride from none to all everywhere where I found it. My .htaccess RewriteEngine On # Handle Authorization Header RewriteCond %{HTTP:Authorization} . RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [L,R=301] # Send Requests To Front Controller... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] But still nothing is work, still error and 500 header, when I tried to change URL from laravel.loc to some route, like example laravel.loc/telescope/
Wembley (1 rep)
Feb 19, 2023, 07:42 AM
1 votes
0 answers
356 views
How to disable the default Apache installation
I am trying to disable the default Apache installation on my M1 MBP, however I am hitting problems. Checking Apache configuration suggests the default is still configured. ``` apachectl -S AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using crmpicco.local. Se...
I am trying to disable the default Apache installation on my M1 MBP, however I am hitting problems. Checking Apache configuration suggests the default is still configured.
apachectl -S
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using crmpicco.local. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
ServerRoot: "/usr"
Main DocumentRoot: "/Library/WebServer/Documents"
Main ErrorLog: "/private/var/log/apache2/error_log"
Mutex default: dir="/private/var/run/" mechanism=default 
Mutex mpm-accept: using_defaults
PidFile: "/private/var/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="_www" id=70 not_used
Group: name="_www" id=70 not_used
When I try to unload the service I get the following error (the org.apache.httpd.plist file is definitely there):
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service
Unload failed: 113: Could not find specified service
I tried without sudo:
launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Warning: Expecting a LaunchAgents path since the command was ran as user. Got LaunchDaemons instead.
launchctl bootout is a recommended alternative.
Unload failed: 5: Input/output error
Try running launchctl bootout as root for richer errors.
Homebrew's (arm64) apache answers on port 8080, however the doc root is /usr/local/var/www yet the apache config is showing as /var/www (where all my application code is).
grep DocumentRoot /usr/local/etc/httpd/httpd.conf                         
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/var/www"
How can I clear my machine of the default Apache entirely?
crmpicco (1081 rep)
Jan 13, 2023, 06:27 AM • Last activity: Jan 13, 2023, 06:58 AM
1 votes
0 answers
137 views
macOS Server Service Proxy reverse proxy request for specific host
Reverse Proxy for Home Assistant with macOS Server 5.3.1 Created a website within Server App for EXTERNALHOSTNAME.TLD Selected SSL Certificate for EXTERNALHOSTNAME.TLD Enabled web app in Advanced Settings This webapp/reverseproxy setup works and Home Assistant is working as expected with no function...
Reverse Proxy for Home Assistant with macOS Server 5.3.1 Created a website within Server App for EXTERNALHOSTNAME.TLD Selected SSL Certificate for EXTERNALHOSTNAME.TLD Enabled web app in Advanced Settings This webapp/reverseproxy setup works and Home Assistant is working as expected with no functional issues via macOS Server, **BUT**, the catch is that any request matching “/api/websocket” is reverse proxied through to home assistant, for any other hostnames, which isn’t ideal. I cant figure out how to configure this upstream Service Proxy to apply this reverse proxy for /api/websocket only for the external hostname for home assistant and not reverse proxy it for all other hostnames. Any pointers on how to get the websocket reverse proxy set up correctly just for the relevant hostname? The three files configured for this to work are as follows; **Webapp PLIST file** /Library/Server/Web/Config/apache2/webapps/EXTERNALHOSTNAME.ha_webapp.plist; includeFiles /Library/Server/Web/Config/apache2/httpd_ha_webapp.conf name EXTERNALHOSTNAME.ha_webapp displayName ReverseProxy - HomeAssistant installationIndicatorFilePath /Library/Server/Web/Config/apache2/httpd_ha_webapp.conf sslPolicy 0 **Webapp CONF file** /Library/Server/Web/Config/apache2/httpd_ha_webapp.conf; ProxyPreserveHost On ProxyRequests off ProxyPass / http://INTERNALHOSTNAME:8123/ ProxyPassReverse / http://INTERNALHOSTNAME:8123/ **MacOS Server Service Proxy CONF file** /Library/Server/Web/Config/Proxy/apache_serviceproxy_customsites_ha.conf ProxyPass /api/websocket ws://INTERNALHOSTNAME:8123/api/websocket ProxyPassReverse /api/websocket ws://INTERNALHOSTNAME:8123/api/websocket
Tim Apple (119 rep)
Jan 2, 2023, 12:11 PM
0 votes
2 answers
1220 views
Apache on localhost doesn't recognize a website unless I include the full path to index.html
Using MacOS 11.1 Big Sur, I'm developing static websites (ie just a standalone index.html, plus JavaScript and CSS files) on my localhost, with the files accessible under `/Library/Web Server/Documents`. Unless I include the full path to the website, including the `index.html` section, the website f...
Using MacOS 11.1 Big Sur, I'm developing static websites (ie just a standalone index.html, plus JavaScript and CSS files) on my localhost, with the files accessible under /Library/Web Server/Documents. Unless I include the full path to the website, including the index.html section, the website fails to load: enter image description here I can even reproduce this with the standard "it works" file: enter image description here How can I get Apache to check for the presence of the index.html file?
Stephen Lead (939 rep)
Mar 9, 2021, 01:29 AM • Last activity: Nov 16, 2022, 05:54 AM
0 votes
1 answers
1223 views
Strictly using "localhost" instead of "localhost:8888" Mac MAMP possible?
I just switched from windows to Mac. I used MAMP for my web development, and with it I could go to "localhost" and it would connect to the server. Now after installing MAMP on a Mac, "localhost" I get Macs native It works!, not my index. If I go to "localhost:8888" it does go to the index though. Is...
I just switched from windows to Mac. I used MAMP for my web development, and with it I could go to "localhost" and it would connect to the server. Now after installing MAMP on a Mac, "localhost" I get Macs native It works!, not my index. If I go to "localhost:8888" it does go to the index though. Is there a way to just use localhost?
Andrew Nelson (119 rep)
Sep 22, 2022, 10:17 PM • Last activity: Sep 22, 2022, 11:07 PM
0 votes
1 answers
105 views
How can I specify a directory from which to run .cgi scripts using apache2 on macos12
I'd like to run .cgi scripts on macos12 running an apache webserver, which uses the Sites folder as webroot by default apparently, so I'd like to put my cgi there. I supposed I should be editing httpd.conf for this based on other threads I've read, but I find no fewer than 15 such files and at least...
I'd like to run .cgi scripts on macos12 running an apache webserver, which uses the Sites folder as webroot by default apparently, so I'd like to put my cgi there. I supposed I should be editing httpd.conf for this based on other threads I've read, but I find no fewer than 15 such files and at least one not found by locate for some reason:
(base) jr@Historys-MacBook-Air Sites % sudo locate httpd.conf
/System/Library/Templates/Data/private/etc/apache2/httpd.conf
/System/Library/Templates/Data/private/etc/apache2/original/httpd.conf
/System/Volumes/Update/mnt1/System/Library/Templates/Data/private/etc/apache2/httpd.conf
/System/Volumes/Update/mnt1/System/Library/Templates/Data/private/etc/apache2/original/httpd.conf
/opt/homebrew/Cellar/httpd/2.4.52/.bottle/etc/httpd/httpd.conf
/opt/homebrew/Cellar/httpd/2.4.52/.bottle/etc/httpd/original/httpd.conf
/opt/homebrew/etc/httpd/httpd.conf
/opt/homebrew/etc/httpd/httpd.conf.default
/opt/homebrew/etc/httpd/original/httpd.conf
/private/etc/apache2/httpd.conf
/private/etc/apache2/original/httpd.conf
those not showing the file I suspect ot be the relevant one, /etc/apache2/httpd.conf. So is that latter the one to edit, or do I need to dig around in the godawful mess of .conf files that locate found?
jeremy_rutman (123 rep)
Mar 22, 2022, 10:20 PM • Last activity: Aug 20, 2022, 11:01 AM
0 votes
1 answers
138 views
Localhost to custom page
I am running macOS 10.12.5 and I am setting up a localhost and everything looks correct. I used brew to install Apache (httpd), MySQL, and PHP. I have changed the hosts file to point the localhost to the custom site and changed the vhost to: ServerAdmin webmaster@dummy-host.example.com DocumentRoot...
I am running macOS 10.12.5 and I am setting up a localhost and everything looks correct. I used brew to install Apache (httpd), MySQL, and PHP. I have changed the hosts file to point the localhost to the custom site and changed the vhost to: ServerAdmin webmaster@dummy-host.example.com DocumentRoot "/Users/me/site" ServerName me.com ServerAlias www.me.com ErrorLog "/private/var/log/apache2/dummy-host.example.com-error_log" CustomLog "/private/var/log/apache2/dummy-host.example.com-access_log" common ` I have updated httpd.conf to include the vhost file and the appropriate php modules needed. When accessing 'localhost' by either 127.0.0.1 or the site name itself I receive the It Works! page instead of the files located in DocumentRoot "/Users/me/site" Note: I am using brew to initialize apache and when using which httpd I am seeing /usr/local/bin/httpd.
Alcyeonnero (173 rep)
Dec 13, 2017, 03:01 PM • Last activity: Jul 14, 2022, 08:46 PM
Showing page 1 of 20 total questions