Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2009
    Posts
    56

    raq4: can virtual site port be changed?

    I have a raq4 with cobalt 6 on it but I can't find anywhere where I can change the port number for a virtual site. I can assign an ip address to a virtual site but not a port number. Are all the raq4 virtual sites hardwired on port 80? Can a port number be changed by telnet command? thanks for any advice.

  2. #2
    In a Strongbolt installation, you can edit the files of folder /etc/httpd/conf/vhosts.

    You must see something like that:
    Code:
    <VirtualHost 192.168.1.200:80>
    ServerName pepito.pepe.com
    ServerAdmin admin
    ...
    Obviously the last number of the first line is the port number. I didn't tried before but may be editing this file works.

    I don't have any CobaltOS server running today but tommorrow I'll be able to check if you want.

    Alberto.

  3. #3
    Join Date
    Jul 2009
    Posts
    56
    I'm not using strongbolt so if you know the solution for cobalt 6 that'd be great, thanks.

  4. #4
    In the CobaltOS the virtual server definitions are at the end of httpd.conf. And it's located in /etc/httpd/conf/.

    The port definition is the same as the newer Apache configurations. Maybe is necessary to stop the Apache webserver before do any change:
    Code:
    # /etc/rc.d/init.d/httpd stop
    
    edit now httpd.conf
    
    # /etc/rc.d/init.d/httpd start
    Let me now if this works.

    Alberto.

  5. #5
    Join Date
    Jul 2009
    Posts
    56
    thanks for your further feedback. At the end of my httpd.conf file I found the site and it looked like this:
    *****************************************************************
    httpd.conf [-M--] 0:453+47=500/500 - *17511/17511b= -1
    ServerName www.mydomain.com
    ServerAdmin admin
    DocumentRoot /home/sites/site2/web
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^172.16.1.36(:80)?$
    RewriteCond %{HTTP_HOST} !^www.mydomain.com(:80)?$
    RewriteRule ^/(.*) http://www.mydomain.com/$1 [L,R]
    RewriteOptions inherit
    AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site2/users/$1/web/$3

    I changed 172.16.1.36(:80) to 172.16.1.37(:5000) and www.mydomain.com(:80) to www.mydomain.com(:5000) but it hasn't worked. I did the httpd start stop thing before and after the edit too. I've also forwarded the new port (5000) to the new ip address in the router.
    I've watched the raq's web traffic closely and the request is actually getting to the correct ip address in the raq but the raq is not giving the page. I have a feeling I'm part way there but there's still something else that might need editing to make this port change work.

    perhaps if it can't be done I'll just have to shell out and get strongbolt.

  6. #6
    It works!

    Continuing with our little investigation, I powerd up a RaQ 4 today. It has many of the Zeffie's updates.

    Taking a look in the Apache 1.3 manual I found we need to add this line:
    Code:
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, in addition to the default. See also the VirtualHost command
    
    Listen 80
    Listen 5000
    I've attached the httpd.conf file. Today I only can test it locally (accessing with http://192.168.2.102:5000/) but nothing makes me think it doesn't work from outside my network.

    my virtualsite is configured in this way:
    Code:
    <VirtualHost 192.168.2.102:5000>
    ServerName test5000.titox-net.es
    ServerAdmin admin
    DocumentRoot /home/sites/site1/web
    RewriteEngine on
    RewriteCond %{HTTP_HOST}                !^192.168.2.102(:5000)?$
    RewriteCond %{HTTP_HOST}                !^test5000.titox-net.es(:5000)?$
    RewriteRule ^/(.*)                      http://test5000.titox-net.es/$1 [L,R]
    RewriteOptions inherit
    AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
    AddHandler cgi-wrapper .cgi
    AddHandler cgi-wrapper .pl
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php
    </VirtualHost>
    Cheers,
    Alberto.
    Attached Files Attached Files
    Last edited by Titox; 09-23-2009 at 05:12 PM. Reason: Attachment

  7. #7
    Join Date
    Jul 2009
    Posts
    56
    thanks for your further feedback. I did the extra amendments you gave but now instead of getting the web site (mydomain.com) at 172.16.1.37 I'm getting the raq admin login page. The real raq admin login page has always been a different ip address. I think the Listen 5000 entry caused this. I then put all the httpd.conf settings back as they were but I'm still getting the raq admin login page now but I shouldn't be. I think I've messed it up.

  8. #8
    Oug! My site is working well with this configuration. I modified the DNS of the domain and tested if from outside, it works. Now I only have the welcome page, but I can access the server and administer it. From outside I can see both main and modified site.

    My port changed site is the second virtual site of the server, not the main one. Another thing: Modifiying the httpd.conf file I did a mistake and the Apache didn't want to start. What message you get if you restart the Apache server?

    Code:
    # /etc/rc.d/init.d/httpd restart
    Alberto.

  9. #9
    Join Date
    Jul 2009
    Posts
    56
    I don't get any error message when restarting apache. It stops and restarts fine after I edit httpd.conf. To put things right again I completely deleted the virtual site I was messing with and created a new one. Now everything works again as it should.
    I don't know why the port forward thing doesn't work for me. Changing the port either doesn't give anything, or it gives the wrong location.

Similar Threads

  1. Changed SSH port - How to add extra port to APF?
    By Greedisgood in forum Hosting Security and Technology
    Replies: 3
    Last Post: 06-10-2007, 10:18 AM
  2. Why I can not delete my Virtual Site on Cobalt Raq4?
    By rmouse in forum Dedicated Server
    Replies: 3
    Last Post: 02-08-2007, 08:39 PM
  3. securing virtual site on RaQ4
    By davea in forum Dedicated Server
    Replies: 5
    Last Post: 09-27-2002, 03:17 AM
  4. setting up a virtual site on raq4 with raqshack
    By gridlokd in forum Dedicated Server
    Replies: 4
    Last Post: 05-19-2001, 04:09 AM
  5. Adding Virtual Site to Raq4
    By shone in forum Dedicated Server
    Replies: 1
    Last Post: 05-04-2001, 12:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •