0

I am attempting to forward one of my apache domains onto a different port (which is hosting an Nginx-backed rails app)

In my http.conf for the particular virtual host I have:

<VirtualHost x.x.x.x:80 [2407:e700:0002:0000:0000:0000:c4b3:36fb]:80>
    ServerName subdomain.domain.com.au
    ServerAlias www.subdomain.domain.com.au
    DocumentRoot /home/user/public_html/app
    ServerAdmin webmaster@subdomain.domain.com.au
    UseCanonicalName Off
    CustomLog /usr/local/apache/domlogs/subdomain.domain.com.au combined
    CustomLog /usr/local/apache/domlogs/subdomain.domain.com.au-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    ## User user # Needed for Cpanel::ApacheConf
    UserDir enabled user
    <IfModule mod_suphp.c>
        suPHP_UserGroup user user
    </IfModule>
    <IfModule concurrent_php.c>
        php4_admin_value open_basedir "/home/user:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        php5_admin_value open_basedir "/home/user:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>
        <IfModule mod_php4.c>
            php_admin_value open_basedir "/home/user:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        </IfModule>
        <IfModule mod_php5.c>
            php_admin_value open_basedir "/home/user:/usr/lib/php:/usr/local/lib/php:/tmp"
        </IfModule>
        <IfModule sapi_apache2.c>
            php_admin_value open_basedir "/home/user:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
        </IfModule>
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        <IfModule !mod_ruid2.c>
            SuexecUserGroup user user
        </IfModule>
    </IfModule>
    <IfModule mod_ruid2.c>
        RMode config
        RUidGid user user
    </IfModule>
    <IfModule itk.c>
        # For more information on MPM ITK, please read:
        #   http://mpm-itk.sesse.net/
        AssignUserID user user
    </IfModule>

    ScriptAlias /cgi-bin/ /home/user/public_html/app/cgi-bin/






    Include "/usr/local/apache/conf/userdata/std/2_2/user/subdomain.domain.com.au/*.conf"
</VirtualHost>

I then have a file located at /usr/local/apache/conf/userdata/std/2_2/user/subdomain.domain.com.au/*.conf with the following in it:

ProxyPass / http://x.x.x.x:3013/
ProxyPassReverse / http://x.x.x.x:3013/
ProxyPreserveHost On
ProxyRequests Off

<Proxy *>
  Order allow,deny
  Allow from all
</Proxy>

Anything obvious wrong?

EDIT: By not working I mean that when I browse to subdomain.domain.com.au it shows me a page with a title of "Index of /" listing a cgi-bin folder and the footer tells me that "Proudly Served by LiteSpeed Web Server Port 80" so it is not being forwarded at all. If it were being forwarded through correctly I would be expecting to see the root page of my rails application.

Jay
  • 9
  • 2

1 Answers1

0

I do not think you apache knows of the existance of that file.

/usr/local/apache/conf/userdata/std/2_2/user/subdomain.domain.com.au

Does you apache.conf specify for apache to lok in that path?

If you run

netstat -pan | grep LISTEN

... does the port show up as being listened on?

It looks like apache is directing the traffic as specified in your vhost conf file. I am not sure for what reason it should do anything else, as THAT is what you are telling it.

If it is THAT vhost you want to reroute, why do you have all that garbage in it, why not the proxy directives for that subdomain?

steffen
  • 26
  • 1