LinuxQuestions.org
Review your favorite Linux distribution.
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 11-08-2012, 05:06 AM   #1
j0sh-linux
LQ Newbie
 
Registered: Mar 2009
Posts: 10

Rep: Reputation: 2
Re-configuring from a domain name to IP based reference in a Apache server


The earlier domain name that was used on a Apache web server is no longer in use. And so the webserver will be directly referenced by the public IP address. What I need to know is how to reconfigure the webserver for IP based referencing.

Do I need the ServerName directive to have the IP address instead of the domain name?

There are two virtualhosts, one for port 80, and the other for port 443, currently it is configured as,

Code:
<Virtualhost *:80>
Should this be changed to
Code:
<Virtualhost Public-IP-Address:80>
?

There are a lot of rewrites directives in the configuration. Can I simply replace the domain names with the IP address?
 
Old 11-08-2012, 06:03 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
Quote:
What I need to know is how to reconfigure the webserver for IP based referencing.

Do I need the ServerName directive to have the IP address instead of the domain name?
Normally you don't have to do anything, but you can change the ServerName to
Code:
ServerName Public-IP-Address
in both ssl and not-ssl vhosts.
 
  


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
configuring apache to server both http and https for a domain name nkoplm Linux - Server 1 05-06-2012 10:40 PM
Call DNS server based on domain query benjalien Linux - Networking 3 09-26-2011 06:13 AM
Printing to a Windows domain-based print server slickrcbd Linux - Networking 1 01-09-2011 05:59 PM
Choosing DNS server based on domain being queried xtc Linux - Networking 3 10-01-2009 10:21 AM
Configuring sendmail on a non-domain server ajatiti Linux - Enterprise 4 12-07-2007 08:57 AM

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

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