Sometimes copying and pasting from an internet forum can insert invisible, invalid characters into config files. Now you are ready to turn on Apache itself. The permissions on those subdirectories may allow, or deny, access to other users such as the _But this User Tip is a minimal setup guide, so we will just do the minimum here. This will add an ACL permission to your home directory that will allow the Apache web server access to all subdirectories inside your home directory. This includes the special “_chmod +a "_www allow execute" ~ By default, other users have no access to another user's home directory. There are new security defaults in macOS 12 “Monterey”. You may need to make changes to this configuration to enable things such as additional languages, access from devices other than localhost, and. Options Indexes MultiViews FollowSymLinks ExecCGI If that file doesn't exist, you will need to create it with:Įven if the file does exist, double check the content. It does appear to be created when you create a new user. That file may not exist and if you upgrade from an older version, you may still not have it. It should exist at the path: /etc/apache2/users/.conf. While you are in /etc/apache2, double-check to make sure you have a user config file. To create one manually, enter the following:Įcho "My site works" > ~/Sites/ If you already had a Sites folder, it should still be there. Lion and later versions no longer create personal web sites by default. Include /private/etc/apache2/users/*.conf #Include /private/etc/apache2/users/*.conf Open the file you just enabled above with: (See below for an important new ACL change that will be required in Monterey for personal websites.) LoadModule userdir_module libexec/apache2/mod_userdir.so #LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule perl_module libexec/apache2/mod_perl.soĮnable personal websites by uncommenting the following at line 184: #LoadModule perl_module libexec/apache2/mod_perl.so If you want to run Perl scripts, you will need to do the following:Įnable Perl by uncommenting line 188 changing: PHP may be deprecated but Perl will soon be activated. □ Supposedly, the PHP acronym stood for “People Hate Perl”. #PHP was deprecated in macOS 11 and removed from macOS 12Īll the hip web developers are using various Javascript frameworks these days anyway. Apple even includes the following note at line 187 of this file: Sorry, but PHP is NOT included in Monterey. To get started, edit the Apache configuration file as root: Lines in bold are what you will have to type in.
0 Comments
Leave a Reply. |