New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSCache and CWP CageFS at no extra cost with all CWPpro licences. The LSCache plugin is integrated into our WordPress and other script installers, and CWP CageFS gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

Can I redirect the server's IP to a domain?

Started by ahmedalnagar, August 23, 2019, 09:16:25 AM

Previous topic - Next topic

ahmedalnagar

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
كن في الحياه كعابر سبيل واترك وراءك كل اثر جميل فما نحن في الدنيا الا ضيوف وما على الضيوف الا الرحيل

rcschaff

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
Google Hangouts:  rcschaff82@gmail.com

Igor S.

Also, you can add .htaccess to /usr/local/apache/htdocs/ and make the redirect there.
Something like: Redirect / http://some_domain



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