LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-20-2018, 02:58 PM   #1
ziggs
Member
 
Registered: Jan 2018
Posts: 37

Rep: Reputation: Disabled
Cannot get curl: (1) Protocol httpd not supported or disabled in libcurl to work?


Hi all,

I cannot get curl to work on my local host for server-status.

I already put it in my httpd.conf file. As well, PHP is installed. I read the guide, but I do not see libcurl in my httpd.conf file.As well, I used to vi to edit and block a specific IP address. This is for apache 2.4 in Centos7.



45 # Dynamic Shared Object (DSO) Support
46 #
47 # To be able to use the functionality of a module which was built as a D SO you
48 # have to place corresponding `LoadModule' lines at this location so the
49 # directives contained in it are actually available _before_ they are us ed.
50 # Statically compiled modules (those listed by `httpd -l') do not need
51 # to be loaded here.
52 #
53 # Example:
54 # LoadModule foo_module modules/mod_foo.so
55 #
56 Include conf.modules.d/*.conf
57 LoadModule status_module modules/mod_status.so
58
59 ExtendedStatus on
60
61 <Location /server-status>
62 SetHandler server-status
63 Order deny,allow
64 Deny from all
65 Allow from 10.
66 </Location>







104 #ServerName www.example.com:80
105
106 <Directory /var/www/path/to/your/web/documents>
107 order allow,deny
108 deny from 192.168.XXX.XXX
109 allow from all
110 </Directory>
111
112 # Deny access to the entirety of your server's filesystem. You must
113 # explicitly permit access to web content directories in other
114 # <Directory> blocks below.
115 #
116 <Directory />
117 AllowOverride none
118 Require all denied
119 </Directory>

Any help is appreciated! Thank you


(Update) - Does this mean my virtual host directory is not set up correctly? I am root, so it is odd that permission is denied.

Thanks

I am not getting this error: [root@localhost /]# curl http://localhost/server-status
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /server-status
on this server.</p>
</body></html>

(2nd update) - Now this error: Duplicate configuration in httpd.conf?

Apr 20 18:57:28 localhost.localdomain httpd[1051]: [Fri Apr 20 18:57:28.275924 2018] [so:warn] [pid 1051] AH01574: module status_module is already loaded, skipping
Apr 20 18:57:28 localhost.localdomain httpd[1051]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message

Last edited by ziggs; 04-20-2018 at 06:08 PM.
 
Old 04-20-2018, 07:00 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,541

Rep: Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866
I don't see any virtual host configuration in your post

Allow directive is obsolete, use require
Code:
<Location /server-status>
  SetHandler server-status
  Require 10
</Location>
This should allow access to any host in subnet 10.xxx.xxx.xxx

Last edited by keefaz; 04-20-2018 at 07:05 PM.
 
Old 04-20-2018, 07:29 PM   #3
ziggs
Member
 
Registered: Jan 2018
Posts: 37

Original Poster
Rep: Reputation: Disabled
Hi Keefaz,

I changed it as you had stated, but I get this error now:

-- Unit httpd.service has begun starting up.
Apr 20 20:26:18 localhost.localdomain httpd[1582]: [Fri Apr 20 20:26:18.177528 2018] [so:warn] [pid 1582] AH01574: module status_module is already loaded, skipping
Apr 20 20:26:18 localhost.localdomain httpd[1582]: AH00526: Syntax error on line 63 of /etc/httpd/conf/httpd.conf:
Apr 20 20:26:18 localhost.localdomain httpd[1582]: Unknown Authz provider: 10
Apr 20 20:26:18 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Apr 20 20:26:18 localhost.localdomain kill[1584]: kill: cannot find process ""
Apr 20 20:26:18 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Apr 20 20:26:18 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Apr 20 20:26:18 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Apr 20 20:26:18 localhost.localdomain systemd[1]: httpd.service failed.
Apr 20 20:26:18 localhost.localdomain polkitd[688]: Unregistered Authentication Agent for unix-process:1571:533411 (system bus name :1.32, object path /org/freedesktop/PolicyKit1/Au
[root@localhost conf]# vi /etc/httpd/conf/httpd.conf
 
Old 04-21-2018, 07:33 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,541

Rep: Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866
Sorry
Code:
<Location /server-status>
  SetHandler server-status
  Require ip 10
</Location>
 
Old 04-21-2018, 01:30 PM   #5
ziggs
Member
 
Registered: Jan 2018
Posts: 37

Original Poster
Rep: Reputation: Disabled
Linux and Apache issues

Hi Keefaz,

So I used this and it works:

56 Include conf.modules.d/*.conf
57
58
59 #DJ added
60
61 ExtendedStatus on
62
63 <Location /server-status>
64 SetHandler server-status
65 Order deny,allow
66 Deny from 192.168.XXX.XXX
67 Allow from 10.
68 </Location>
69

I set it to refuse connections from my Vmware address, and allow from 10.

This works fine:[curl http://localhost/server-status] in my Unix box, but when I put it into my Mozilla so that the PHP file and Apache file come up, it keeps telling me that I have it set to refuse connections. I have no proxy set for localhost,127.0.0.1. So I am confused as to why it is not allowing me to pull it up! I was able to before, but not now.
 
Old 04-21-2018, 02:17 PM   #6
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,541

Rep: Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866
Maybe a cache issue? Try clear Cached Web Content in preferences / Privacy & Security

Not sure what the php file is about as server-status page is generated directly by apache
 
Old 04-21-2018, 02:20 PM   #7
ziggs
Member
 
Registered: Jan 2018
Posts: 37

Original Poster
Rep: Reputation: Disabled
I installed PHP and created a config file for it, to get some other information. This may be the problem: [Process: 1817 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS]. Before, I never had this issue. I made the horrible mistake of not backing up my httpd.conf file and have had issues since. Any help with this error? I did clear out my cache and security setting as well.

Thanks
 
Old 04-21-2018, 02:21 PM   #8
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,541

Rep: Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866Reputation: 866
Try run " sudo apachectl configtest "
That should report any configuration issue
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Curl - configuring protocol Manjunath1847 Linux - General 1 06-25-2010 04:01 AM
Could I get rid of libcurl.dll and compile a stand-lone application with Curl? Kunsheng Programming 5 06-07-2009 06:34 PM
curl: (1) Protocol https not supported or disabled in libcurl guest Linux - Software 1 05-01-2009 03:40 AM
libcurl & curl-config problems jz32300 Linux - Newbie 2 06-09-2006 01:25 PM
clweather curl libcurl Suse 9.2 acummings SUSE / openSUSE 1 01-01-2005 01:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration