- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Setting up a virtual server to listen on Port 80
Operating System - Linux
1758039
Members
2279
Online
108867
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 02:05 AM
тАО08-18-2006 02:05 AM
I have a apache https server listening on port 443 and I get to it by going to https://, what I am looking for in guidance is how to set up a virtual server to listen to port 80 also and rederict it the secure port, so the users only have to type in .com The apache is running on RedHat Version E4 and Apache is 2.0.59.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 03:11 AM
тАО08-18-2006 03:11 AM
Solution
Shalom,
httpd.conf code
Virtual site:
ServerAdmin sprotter@investmenttool.com
DocumentRoot /web/tehillimsongs/htdocs
ServerName tehillimsongs.com:80
ServerAlias www.tehillimsongs.com
ScriptAlias /cgi-bin/ "/web/tehillimsongs/cgi-bin/"
ErrorLog logs/tehillimsongs.com.error_log
CustomLog logs/tehillimsongs.com.access_log common
This works http://www.tehillimsongs.com
That is not the primary for the webserver.
There is one shared ssl certificate on https
https works on all sites but since there can only be one certificate per ip address there is an intitial connect warning on all sites but the master.
config code:
standard ssl.conf
SSLCertificateFile /etc/httpd/conf/ssl.crt/shalom-cert.pem
That line added.
SEP
httpd.conf code
Virtual site:
ServerAdmin sprotter@investmenttool.com
DocumentRoot /web/tehillimsongs/htdocs
ServerName tehillimsongs.com:80
ServerAlias www.tehillimsongs.com
ScriptAlias /cgi-bin/ "/web/tehillimsongs/cgi-bin/"
ErrorLog logs/tehillimsongs.com.error_log
CustomLog logs/tehillimsongs.com.access_log common
This works http://www.tehillimsongs.com
That is not the primary for the webserver.
There is one shared ssl certificate on https
https works on all sites but since there can only be one certificate per ip address there is an intitial connect warning on all sites but the master.
config code:
standard ssl.conf
SSLCertificateFile /etc/httpd/conf/ssl.crt/shalom-cert.pem
That line added.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 03:48 AM
тАО08-18-2006 03:48 AM
Re: Setting up a virtual server to listen on Port 80
Not sure if I understand what you want, but it seems that you want that secure connections is automatically established even when the client does not specify https in the URL. That is, redirect non secure port 80 to the secure port.
You can do it with mod_rewrite. Create a file called /etc/httpd/conf.d/mod_rewrite.conf with the following contents:
# Rewrite Rules.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/webmail/(.*) https://%{SERVER_NAME}/webmail/$1 [R,L]
In this example, any request for http://yourserver.com/webmail will be redirected to https://yourserver.com/webmail
You can do it with mod_rewrite. Create a file called /etc/httpd/conf.d/mod_rewrite.conf with the following contents:
# Rewrite Rules.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/webmail/(.*) https://%{SERVER_NAME}/webmail/$1 [R,L]
In this example, any request for http://yourserver.com/webmail will be redirected to https://yourserver.com/webmail
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2006 03:58 AM
тАО08-18-2006 03:58 AM
Re: Setting up a virtual server to listen on Port 80
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
DocumentRoot "/usr/local/apache2/htdocs"
ServerName hlah.blahblah.com
ServerAdmin unixsysm@harrisconnect.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log
# Added by jmarrion, redirect to the https page (2006-08-18)
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
DocumentRoot "/usr/local/apache2/htdocs"
ServerName hlah.blahblah.com
ServerAdmin unixsysm@harrisconnect.com
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log
# Added by jmarrion, redirect to the https page (2006-08-18)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP