Unix/Linux Go Back    


Web Programming Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, HTML, SEO, and other Web APIs and topics.

Passing variable from PHP to bash script

Web Programming


Tags
apache config, solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 12-08-2017   -   Original Discussion by kieranfoley
jgt's Unix or Linux Image
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 21 May 2018, 10:23 PM EDT
Location: 44.21.48N 80.50.15W
Posts: 2,066
Thanks: 2
Thanked 287 Times in 264 Posts
Is there additional information in the apache error log file about the authorization failure?
Sponsored Links
    #9  
Old Unix and Linux 12-08-2017   -   Original Discussion by kieranfoley
kieranfoley's Unix or Linux Image
kieranfoley kieranfoley is offline
Registered User
 
Join Date: May 2009
Last Activity: 11 December 2017, 8:50 AM EST
Posts: 47
Thanks: 11
Thanked 1 Time in 1 Post
This is the error in the apache log when I run curl in verbose. curl -vvv (note: the IP address is correct for seieadpa01)



Code:
* About to connect() to seieadpa01 port 9004 (#0)
*   Trying 172.16.120.152... Failed to connect to 172.16.120.152: Permission denied
* Success
* couldn't connect to host
* Closing connection #0

Sponsored Links
    #10  
Old Unix and Linux 12-08-2017   -   Original Discussion by kieranfoley
jgt's Unix or Linux Image
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 21 May 2018, 10:23 PM EDT
Location: 44.21.48N 80.50.15W
Posts: 2,066
Thanks: 2
Thanked 287 Times in 264 Posts
When you use curl from your workstation, you are connecting from your workstation. However, when you connect through the web page you are connecting from the web server. The problem may be the two web servers are on different class C networks.
The Following 2 Users Say Thank You to jgt For This Useful Post:
kieranfoley (12-09-2017), Neo (12-08-2017)
    #11  
Old Unix and Linux 12-09-2017   -   Original Discussion by kieranfoley
kieranfoley's Unix or Linux Image
kieranfoley kieranfoley is offline
Registered User
 
Join Date: May 2009
Last Activity: 11 December 2017, 8:50 AM EST
Posts: 47
Thanks: 11
Thanked 1 Time in 1 Post
Thanks jgt. I get what you are saying. It definitely has something to do with how my apache webserver communicates with seieadpa01. I will investigate this.

---------- Post updated at 08:02 AM ---------- Previous update was at 07:53 AM ----------

This has been resolved. I ran the following command on my apache server and now I can connect without issues.



Code:
setsebool -P httpd_can_network_connect=1

Thanks again!
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing variable from bash to perl script NileshJ Shell Programming and Scripting 6 02-03-2016 10:23 AM
Passing string as variable(s) in bash Starting_Leaf Shell Programming and Scripting 2 04-06-2013 02:35 PM
Trouble with passing Variable from bash to awk gsub command Nostyx Shell Programming and Scripting 9 12-09-2011 07:32 AM
Passing Bash variable to javascript numele Shell Programming and Scripting 3 04-12-2010 06:38 PM
passing variable from bash to perl from bash script arsidh Shell Programming and Scripting 10 06-04-2008 12:25 PM



All times are GMT -4. The time now is 04:21 AM.