ERR_EMPTY_RESPONSE from web server -- re: etresoft "Setting up a local webserver on macOS 12 "Monterey"

Everything worked as described in the article except the Perl test file at the end. When I search http://localhost/~<my short user name>/info.pl, my browser shows "local host didn't send any data ERR_EMPTY_RESPONSE".


How can I get localhost to respond? Thanks.


PS. I show perl perl5.18 and perl5.30 in /usr/bin

MacBook Pro 15″, macOS 12.6

Posted on Jul 17, 2023 7:27 AM

Reply

Similar questions

7 replies

Jul 17, 2023 10:21 AM in response to BillyBoyS41

BillyBoyS41 wrote:

I've been practicing perl with z shell and vim, and it functions as it should. I've reached the CGI chapter in the manual and want to see what happens in the browser.

When I check /opt directory, no files appear.


Edit: nevermind...


Okay, so no Homebrew here.


Does a Perl test print work when invoked (a print, without the MOD_PERL environment variable)?

print "Hello, World!\n";


Are the perl script protections on info.pl set to be accessible to the _www user?


Does placing the Perl script in the main httpd directory (and marking it as executable) work?


Jul 17, 2023 8:58 AM in response to MrHoffman

Those are exactly the instructions I followed. The instructions work all the way through to the final connection to perl. When I check http://localhost/~myusername/info.pl, the browser shows -- localhost didn't send any data ERR_EMPTY_RESPONSE.


I'm guessing perhaps something in my firewall may be preventing the proper connection. Or, it may be something entirely different.


Thanks for the help.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ERR_EMPTY_RESPONSE from web server -- re: etresoft "Setting up a local webserver on macOS 12 "Monterey"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.