The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Domain root was "hijacked" by rails

Discussion in 'General Discussion' started by Gerto, Oct 31, 2008.

  1. Gerto

    Gerto Member

    Joined:
    Oct 19, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    A while ago, I decided to set up rails for my domain name.
    So, I set up a rails app and rewrite from "mydomain.com" to "mydomain.com:12001" through cpanel (RoR screen).

    However, after a lot of problems , I've decided not to use rails for my domain for now. I deleted the app and the rewrite... but my domain root still redirects to the rails app (/home/username/railsapp/public/index.html) instead of the default /home/username/public_html/

    I've removed all rails apps and all rewrites through cpanel.
    I've checked my httpd.conf , and the documentroot for my domain there is correct.

    I guess something went wrong while removing the rewrite and I need to manually remove it, but I haven't got a clue where they are stored

    I even tried recreating the redirect and removing it again, but no luck.

    Any suggestions?

    Thanks!
     
    #1 Gerto, Oct 31, 2008
    Last edited: Oct 31, 2008
  2. Gerto

    Gerto Member

    Joined:
    Oct 19, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I managed to fix this myself, apparently I had to look in my htaccess file.

    However, I was wondering if this is not a bug:
    I never got the redirects working, there were several problems (apps not running, rewrites failing , ...)
    Now , when I look in my .htaccess, it says:
    Code:
    RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.mydomain.com$
    RewriteRule ^projects "http\:\/\/127\.0\.0\.1\:12001%{REQUEST_URI}" [P,QSA,L]
    Now, I don't know much about rewrites and htaccess, but shouldn't this "127.0.0.1" be the domain name instead?

    Seems quite logical to me that it fails this way? Or is 127.0.0.1 the correct way to do it? (sorry if it is, I don't know much about rewrites, just trying to help in case this is a bug)
     
Loading...

Share This Page