Why is "It works!" showing up at my http://127.0.0.1 (localhost)?
2,203
Solution 1
This is default behavior in OSX when you enable the web server in the properties. You can find it in this control pane:
Solution 2
Newer versions of macOS might not have the option displayed in the Sharing panel, as is shown in Bart De Vos's answer. In that case, running this command from Terminal should stop it:
sudo apachectl stop
Based on my own experience, it shouldn't start up automatically after that, even after a system restart.
Or, if you want to start it manually:
sudo apachectl start
Related videos on Youtube
Author by
RunLoop
Updated on September 18, 2022Comments
-
RunLoop over 1 year
When a celery task I have set up is executed, the following exception is thrown when it attempts to fetch an object from the database:
File "/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) OperationalError: FATAL: Peer authentication failed for user "chris"
This only occurs when a task is run by Celery. How can I fix this please?
My "host" setting is an empty string "" in settings.py.
Stack
Python 2.7.10, Django 1.8.5
-
Burhan Khalid over 8 yearsThe same credentials are working for the actual django app?
-
RunLoop over 8 years@BurhanKhalid Yes, the actual app is working fine - I can add,edit and delete using the admin or api.
-
Burhan Khalid over 8 yearsUsing the same user account?
-
RunLoop over 8 years@NickBarnes Thx - Your comment about not running as Chris tipped me off..I had set the user for Celery to "nobody". Changing it to Chris solved it. If you paste your comment as an answer I will accept it.
-
-
Admin over 12 yearsHey that's it! Thanks for the answer, I forgot I left that on. I just turned it off because I had forgotten to a while back when I was playing with settings.
-
Foovanadil almost 7 yearsThanks, took way to log to figure that out for me. I had to google the exact HTML it was returning to find this comment. Also, interestingly running lsof -i :80 didn't show anything running on port 80 which threw me for a while. doing the stop command on apache fixed the issue.
-
Foovanadil almost 7 yearsActually to update that comment about lsof. It will show something but you need to SUDO the command to see things on port 80. If you don't it doesn't fail it just looks like nothing is running on that port.