This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

subdomain with www is not working !!!!
#6
RE: subdomain with www is not working !!!!
(08-07-2018, 03:08 PM)yusha Wrote: Yeah I have seen that file. Please Give me step by step method if it works for you

Note: Be careful while editing the vhosts file, this can cause apache to stop working if edited wrongly! Also I'm on Ubuntu, I hope it works on CentOS

You can do this by performing the following steps:
  1. Open /etc/sentora/configs/apache/httpd-vhosts.conf using your favourite editor (I prefer nano). Scroll down till you find the record for your subdomain, which will look like #DOMAIN: sub.domain.com 
  2. Add a new line under the "ServerName" line
    Code:
    ServerAlias www.sub.domain.com


  3. save the file and exit the editor.
  4. Go to your host DNS editor (not the one of Sentora) and add an A record. If your subdomain is sub.domain.com, then the A record should be "sub" (leave quotes out) and point to your public IP address. Your DNS should already have a www entry for your main domain, so you can leave it as it is or add it if missing.
  5. Restart Apache. For me since I'm on ubuntu, I use
    Code:
    service apache2 restart


  6. Test and see if it works. If it doesn't, you may need to clear your cache; for me I tested on another browser instead of clearing my cache and losing temporary files, it works perfectly.
Hope this is clear enough; cheers!
***********************************************
SAMUEL AVOLA MUNGUJAKISA         *
CEO, Bero Computers                         *
www.berocomputers.com          *
+256754086797                           *
+256780585402                     *
*****************************  *
Reply
Thanks given by:


Messages In This Thread
subdomain with www is not working !!!! - by yusha - 08-06-2018, 05:07 AM
RE: subdomain with www is not working !!!! - by mungujakisa - 08-07-2018, 03:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Public_html Inside Domain/Subdomain zHostingSolutions 2 4 ,181 07-23-2021, 09:57 AM
Last Post: Nigel
redirect error after letsencrypt + subdomain mizerek 1 4 ,116 08-06-2020, 04:54 AM
Last Post: mizerek
Add on Domains not working but Main domain works luckyviet 2 5 ,540 03-18-2020, 07:38 PM
Last Post: AanaNahum

Forum Jump:


Users browsing this thread: 2 Guest(s)