Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
Apache, Apache Default folder, Apache PHP not parsing

I have been messing around with apache in the terminal on macOS Catalina 10.15.4. I was following tutorial & tutorial2. I got everything working, up to a point. The localhost displays just fine and I can add html websites to the default domain and they load perfectly. My issues are:

  1. PHP is not parsing from default apache folder. Just displays code in browswer.
  2. I have tried editing the document root in httpd.conf, but nothing changes
  3. I have tried to undo most of what I have done so far, but now I am getting this error:

'Set the 'ServerName' directive globally to suppress this message'

Any advice? Is there a way to reset all apache's settings to their default values?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

make certain that in your /usr/local/etc/http/httpd.conf you have something like:

LoadModule php7_module /usr/local/opt/php@7.2/lib/httpd/modules/libphp7.so

<IfModule php7_module>
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
</IfModule>

ymmv. I am assuming you brewed in apache, and you have php installed.

This works on mojave, with apache and php7.2 brewed. Adapt to your own setup. Never wanted ever to downgrade to catalina, so i dunno how the apple and brew crews mangled the configurations, but should be close.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!