LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-24-2010, 08:09 AM   #1
kongfranon
Member
 
Registered: Aug 2010
Posts: 30

Rep: Reputation: 0
Apache - cannot hit site external


Only from internal lan. I have secondary IP address added for SSL site, and we are natting that address from that outside.

I can hit it if I change my hosts file to that local IP on the server itself, but when using external NAT address it never hits the server. But if you telnet to that external address with port 80 or 443 it works.

Is it something with my config?

Thanks

Here is a sample of my config with servername and ip addresses changed:

<VirtualHost 192.168.150.100:80>
ServerName sample.website.com
ServerAlias sample.website.com

RewriteEngine on
Redirect permanent / https://sample.website.com/


</VirtualHost>



<VirtualHost 192.168.150.100:443>
ServerName sample.website.com
ServerAlias sample.website.com
ErrorLog logs/sample.website.com-error-ssl.log
CustomLog logs/sample.website.com-access-ssl.log combined

RewriteEngine on
RewriteLog logs/sample.website.com_rewrite_log
RewriteLogLevel 0

ProxyRequests Off


RewriteCond %{HTTP_HOST} sample.website.com
RewriteRule ^/(.*) http://sample.different.com/$1 [P]

SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /usr/local/ssl/sample.com.crt
SSLCertificateKeyFile /usr/local/ssl/sample.com.key

<Location />

SSLRequireSSL


SSLRequire %{SSL_CLIENT_S_DN_O} eq "sample"

SSLVerifyClient require

SSLVerifyDepth 1

SSLCACertificateFile /usr/local/apache2/ssl/sampleCA.crt


</Location>

</VirtualHost>


Thanks again in advance.
 
Old 08-24-2010, 11:51 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
Hi,

You don't need the server's IP address. Use:
Code:
NameVirtualHost *:80
NameVirtualHost *:443
and change the vhosts accordingly:
Code:
<VirtualHost *:80>
ServerName sample.website.com
...
</VirtualHost>

<VirtualHost *:443>
ServerName sample.website.com
...
</VirtualHost>
 
  


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
sarg report genertaion via the first hit site aeby Linux - Software 0 05-12-2009 08:31 AM
Apache site redirects using what rule? foo.site.com -> www.site.com/foo LaughingBoy Linux - Server 2 04-16-2009 09:51 PM
Hi, I've got an apache server which keeps crashing when I hit it with a web browser. humbletech99 Linux - Networking 6 11-30-2005 03:06 AM
Apache Server and Hit Counter k1ll3r_x Linux - Software 4 07-05-2005 06:58 AM
Apache virtual hosts for intranet and external site tawalker Linux - Software 12 06-25-2004 11:01 AM

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

All times are GMT -5. The time now is 06:57 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