LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-25-2009, 08:43 AM   #1
lostjohnny
Member
 
Registered: May 2006
Distribution: Fedora Core 6
Posts: 37

Rep: Reputation: 15
Can't configure Apache to serve https on alternate port


Hi,

I've been running an Apache web server serving on the default http and https ports for over a year now. But there is now another https server on the network whose port can't be configured, so I'm trying to get my server to serve https on an alternate port so that it can be accessed from the Internet.

In /etc/httpd/conf.d/ssl.conf I changed the Listen directive to

Code:
Listen 1184
and restarted httpd. Now when I try to connect with

Code:
lynx https://127.0.0.1:1184/
I get the error

Code:
Looking up 127.0.0.1:1184
Making HTTPS connection to 127.0.0.1:1184
Retrying connection without TLS.
Looking up 127.0.0.1:1184
Making HTTPS connection to 127.0.0.1:1184
Alert!: Unable to make secure connection to remote host.

lynx: Can't access startfile https://127.0.0.1:1184/
nmap gives

Code:
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-10-25 13:35 GMT
Interesting ports on localhost (127.0.0.1):
Not shown: 1674 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
80/tcp   open  http
111/tcp  open  rpcbind
960/tcp  open  unknown
3306/tcp open  mysql

Nmap finished: 1 IP address (1 host up) scanned in 0.130 seconds
There are no virtual hosts defined in my /etc/httpd/conf/httpd.conf

Any ideas, please?
 
Old 10-25-2009, 09:19 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Ypu should start by checking the apache error_log for hints.

Regards
 
Old 10-25-2009, 09:31 AM   #3
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
Do you have firewall blocking the port?
 
Old 10-25-2009, 10:02 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
There can be 10s or 100s or 1000s or ... apache servers listening on port 443 in the same network. They are differentiated by their ip-addresses.

So I suppose I'm missing something. Can you please try to explain what I'm missing ?
 
Old 10-28-2009, 07:36 AM   #5
lostjohnny
Member
 
Registered: May 2006
Distribution: Fedora Core 6
Posts: 37

Original Poster
Rep: Reputation: 15
Thanks bathory, I hadn't thought of looking in the logs for errors.

harry edwards, I've disabled the firewall temporarily while I sort this out, so it's not the firewall. Also, I don't know if the firewall blocks access on the local machine anyway.

Wim Sturkenboom, I want this to be accessed from the Internet. All servers on the network can only be accessed by the router's single public IP address, so I need alternate ports to distinguish which one the client is requesting.
 
Old 10-28-2009, 08:07 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
The simplest test is to use telnet 127.0.0.1 1184 If it can't connect, check
- firewall was already mentioned and you ruled it out
- hosts.allow and hosts.deny
- apache is not listening on that port

Could you connect using lynx https://127.0.0.1 before the changes? I'm thinking that lynx does not like your certificate as it contains a domain name and 127.0.0.1 does not match that domain name; but I might be wrong.

Last edited by Wim Sturkenboom; 10-28-2009 at 08:10 AM.
 
Old 10-30-2009, 12:47 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Check the output of # netstat -ltn

If there is nothing listening on tcp 1184, it is pointless to test connecting there.

As mentioned, Apache's error log should provide clues...
 
  


Reply



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
Sharing https 443 port for apache ssl and ssh server nx5000 Linux - Software 8 09-02-2009 06:19 AM
iptables + squid cannot serve https requests omidm Linux - Networking 4 01-07-2009 02:04 PM
LXer: Linux configure pound reverse proxy for Apache http / https web server LXer Syndicated Linux News 0 12-14-2007 07:20 PM
PHP5.2.2 with Apache 2.2.4 - Can't ./configure - Also, how do I do port fowarding? Virtuality Linux - Server 7 05-30-2007 01:04 PM
turn off http port 80, keep https port 443 lothario Linux - Networking 6 02-11-2005 04:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:03 AM.

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