Control Web Panel
WebPanel => Apache => Topic started by: paky1099 on August 10, 2017, 01:23:30 PM
-
Hi, I created the domain domain.com in the control panel. If i go to http://domain.com I view the HTTP Server Page but I would to redirect domain.com to www.domain.com.
Can I do it? How do you do it?
Thanks
-
??
-
Normally when you create domain.com, the CWP automatic creates www.domain.com as an ServerAlias in the Apache, localhost.domain.com, ftp.domain.com, mail.domain.com and www.domain.com as a CNAME in Bind(DNS). So, just try to open www.domain.com in your browser. If it`s not working than let me know and we will figure it out.
-
I use CloudFlare for DNS and set 301 redirects to preferred domain :)
-
Hi,
the www "version" of the website works correctly but if I write the URL without www I see the HTTP Test Page powered by CWP | CentOS-WebPanel.com.
The DNS zone is managed by OVH, not by CWP (it's an error?).
-
Hi,
I`ve never used OVH, but you should change the "DocumentRoot" in OVH for domain.com to point on the same place where www.domain.com is pointing and you should be ok. Try and let me know.
-
Hi, I managed the DNS zone with OVH...I haven't any VPS/Dedicated Server/Hosting with OVH.
I check the /usr/local/apache/conf.d/vhosts.conf and this is the content:
# vhost_start domain.com
<VirtualHost ip:80>
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin 5
DocumentRoot "/home/g123ftp1/public_html"
ScriptAlias /cgi-bin/ "/home/g123ftp1/public_html/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/g123ftp1/domain.com/*.conf
<IfModule mod_suexec.c>
SuexecUserGroup g123ftp1 g123ftp1
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup g123ftp1 g123ftp1
suPHP_ConfigPath /home/g123ftp1
</IfModule>
<Directory "/home/g123ftp1/public_html">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end domain.com
I tried to add "ServerAlias domain.com" but is the same.
What can I do?
P.S. I compared the DNS zone of CWP with the DNS zone of OVH and there are the same records.
-
Hi Paky1099, did you solve this? I have the same problem.
Subdomains, including www, are ok, but domain.com without www shows test page.
Thanks!