Skip to main content

User for main website

Comments

10 comments

  • ebar
    Also I don't think I meant to make this thread in this directory. Meant to put it in general.
    0
  • SysSachin
    Have you installed SSL on your domain through WHM ?
    0
  • ebar
    So disregard the SSL thing. I did more testing. This thing is whack. I modified my userdata conf file to change its document root to /var/www/html. Which at first test seemed to work. But no. Things are even more ridiculous. Going to mydomain.com redirects to mydomain.com/cgi-sys/defaultwebpage.cgi, despite having uploaded my website to my new document root (and yes I did rebuild the httpd.conf file). But I found out the doing mydomain.com/info.php brings me to the phpinfo file I uploaded. So I tried going to index.php and it brings up the website. So it SEEMS apache isn't recognizing my default index page, and gives me that weird 404 redirect. However, it should give me a directory listing right? It does for other directories. So I went to cpanel.mydomain.com (which is my FQDN for cpanel) and it brings up my site, even without adding the /index.php. Wtf settings have I screwed up, mis-configured, or failed to configure? In conclusion: (-> means "results in") mydomain.com -> mydomain.com/cgi-sys/defaultwebpage.cgi (it should load index.php) mydomain.com/index.php -> mydomain.com/index.php (as one would expect) cpanel.mydomain.com -> mydomain.com/index.php (this is the behavior I want for mydomain.com) So confused. In plesk I've never had an issue like this. Not sure where I went wrong.
    0
  • Infopro
    After a fresh install of WHM/cPanel, I went to www.mydomain.com and get the default 404 page. Perfect, to be expect. So I created a cPanel user to try to manage that domain and so I could add email address to it. I created the user with the domain: mydomain.com.

    Is there an actual cPanel account created with the domain? You can use that domain for the hostname of course, but you will need to create an actual cPanel account to use it as an account.
    0
  • ebar
    Well that's just it. After the install of WHM/cPanel, there are no accounts created. Just the default WHM root account. So yes, I created a cPanel account for mydomain.com. Thats when it changed mydomain.com's document root away from /var/www/html for "some" URLs (even though they should all go to the same spot). Once freshly installed, all you should have to do is create a user account for mydomain.com right? (with cpanel's hostname being cpanel.mydomain.com)
    0
  • Infopro
    Well that's just it. After the install of WHM/cPanel, there are no accounts created. Just the default WHM root account.

    I had a feeling that was the case. The root account is not an actual account you can use for websites/mail by default.
    Once freshly installed, all you should have to do is create a user account for mydomain.com right? (with cpanel's hostname being cpanel.mydomain.com)

    Yes, and no, IMO. I wouldn't suggest using cpanel in the hostname.
    0
  • ebar
    I had a feeling that was the case. The root account is not an actual account you can use for websites/mail by default.

    Well that I basically figured out. So thats when I created the user account for my main domain name, mydomain.com. I did read that proxy domains are enabled by default (which I also verified in the Tweak Config). It doesn't seem to be working though.
    0
  • Infopro
    I created the user account for my main domain name, mydomain.com.

    Does that domain come up in your browser properly or no?
    I did read that proxy domains are enabled by default (which I also verified in the Tweak Config). It doesn't seem to be working though.

    What are your redirection settings here: WebHost Manager "Server Configuration "Tweak Settings, Redirection tab
    I'm looking through the .conf files, and can't figure out why the default index files aren't being recognized by Apache when using standard http.

    Assuming mydomain.com resolves properly, place an index.html in the public_html of the mydomain.com account you created. /home/cpanelusername/public_html/
    0
  • ebar
    What are your redirection settings here: WebHost Manager "Server Configuration "Tweak Settings, Redirection tab

    Off (default)
    Assuming mydomain.com resolves properly, place an index.html in the public_html of the mydomain.com account you created. /home/cpanelusername/public_html/

    I do have an index.php in /home/swc/public_html (swc is the correct cpanel username for mydomain. Also I noticed my browser was sometimes auto-filling the https and I didn't realize it. So I retested all possible URLs, below are the results: (I also put a file in both /var/www/html/ and /home/swc_public_html/ with output indicating where that file is located, to prevent more confusion). ( -> Pulls up /var/www/html/index.php ( -> Pulls up /var/www/html/index.php ------ Edit: I cannot even figure out how the hell this thing is redirecting to that cgi-sys/default page. I deleted the index.html that had a meta-redirect to the default webpage. I checked the source of virtually all other cpanel generated files, nothing redirects to it. I checked the httpd.conf and every other generated .conf file, it is mentioned exactly ZERO times. This makes no sense.
    0
  • ebar
    Final post: It seems I fixed it. First thing I did was rebuild the httpd.conf file after creating my cPanel account for mydomain.com Then restarted httpd. That cleaned up and actually made the .conf file represent what my cPanel settings were. However, I still had this ridiculous redirect that seemed to summon itself out of nowhere. I went ahead and cleared my browser cache across all devices (google sync and all), and it finally works.
    0

Please sign in to leave a comment.