Login
Register
Home
Wiki Knowledge Base
FreeDNS
Facebook
Linux Support
Control Web Panel
MENU
Home
Help
Search
Login
Register
Control Web Panel
»
Other
»
Other
»
Can I redirect the server's IP to a domain?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Can I redirect the server's IP to a domain? (Read 12046 times)
0 Members and 1 Guest are viewing this topic.
ahmedalnagar
Newbie
Posts: 16
لا اله الا الله محمد رسول الله
Can I redirect the server's IP to a domain?
«
on:
August 23, 2019, 09:16:25 AM »
Hi friends
Can I redirect the server's IP to a domain?
I want to redirect the server ip to a domain and direct the control panel from the ip to the domain can I do that
Logged
كن في الحياه كعابر سبيل واترك وراءك كل اثر جميل فما نحن في الدنيا الا ضيوف وما على الضيوف الا الرحيل
rcschaff
Sr. Member
Posts: 820
Jack of all Trades, Master of some.
Re: Can I redirect the server's IP to a domain?
«
Reply #1 on:
January 26, 2020, 04:04:05 PM »
you could use 301 redirects in the proper software config.
nginx:
server {
listen [ip]:80;
listen [ip]:443 ssl;
server_name [ip];
root /some/directory/to/server/files/but/not/used
return 301
https://example.com
$request_uri;
}
*** Alternatively, you can set one of your websites as listen [host]:443
default_server
ssl;
Apache:
<VirtualHost [ip]:80>
ServerName [ip]
Redirect 301 /
https://example.com/
</VirtualHost>
<VirtualHost [ip]:443>
ServerName [ip]
Redirect 301 /
https://example.com/
</VirtualHost>
If you use Varnish, it get's complicated quickly
Logged
Google Hangouts: rcschaff82@gmail.com
Igor S.
The System Administrator for any GNU/Linux
Global Moderator
Hero Member
Posts: 1418
Re: Can I redirect the server's IP to a domain?
«
Reply #2 on:
January 29, 2020, 09:43:35 AM »
Also, you can add .htaccess to /usr/local/apache/htdocs/ and make the redirect there.
Something like: Redirect /
http://some_domain
Logged
You can ask me to solve any problem with your server for some money in pm
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services
Print
Pages: [
1
]
« previous
next »
Control Web Panel
»
Other
»
Other
»
Can I redirect the server's IP to a domain?