Centos domain and apache

soulofangel

Member
Joined
Feb 9, 2013
Messages
234
Reaction score
0
Hi,

I recently bought a domain e.g example.com from namecheap
I oso have a server from digitalocean-centos the ip is e.g ipDC

I need to have A record in namecheap to point to my ipDC right?

So my problem is if i enter "www.example.com" the url will rewrite to ipDC, but i want it to remain as "www.example.com"

Is it my apache conf problem?

i added: LoadModule rewrite_module modules/mod_rewrite.so
Do i need to modify the .htaccess?
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,547
Reaction score
1,301
Hi,

I recently bought a domain e.g example.com from namecheap
I oso have a server from digitalocean-centos the ip is e.g ipDC

I need to have A record in namecheap to point to my ipDC right?

So my problem is if i enter "www.example.com" the url will rewrite to ipDC, but i want it to remain as "www.example.com"

Is it my apache conf problem?

i added: LoadModule rewrite_module modules/mod_rewrite.so
Do i need to modify the .htaccess?

How can your ip be ipDC ? I assume you mean 123.123.123.123 ?

Then all you need is a A record for www.example.com pointing to 123.123.123.123

You should be able to configure this with the web administrative console offer by namecheap to manage your domain name.

There is no need for any rewrite module to perform this configuration.

However if you are using multiple hostname such as www.abc.com and www.def.com and they are both pointing to the same IP address 123.123.123.123

and you want to differentiate them using different hosting in the same apache instance, then what you need is virtualhost configuration in apache.
 

soulofangel

Member
Joined
Feb 9, 2013
Messages
234
Reaction score
0
Thx for the help.

Actually is just a super lame problem.

i think my browser cache kept the previous wrongly configured records.

I tried:
ipconfig /flushdns

configuring the mod_rewrite thing
configuring site-enabled

I discovered that its actually working when i use another computer to try.

After clearing cache it works.
 
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top