Re: virtualhost not picking up for non port 80

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok i found what was wrong,
so i checked out my code from SVN into htdocs folder out of convenience.
that was why the directory allow from all was failing and it was using the main servername instead.

so the moral of this story is, do not use svn on the files/folders of your documentroot
i lost 2 days of my life


On Mon, Apr 12, 2010 at 3:59 PM, Michael Ni <michaelcni@xxxxxxxxx> wrote:
i checked the ports, when apache is down, its clear
i changed the virtual host to localhost:8886 and telnet localhost 8886 is successful

i turned off my antivirus, although it shouldn't affect localhost


On Mon, Apr 12, 2010 at 3:33 PM, Frank Gingras <francois.gingras@xxxxxxxxx> wrote:
Michael,

Start apache, check netstat -plant for the process, then try to telnet to the port on localhost. If that fails, it's probably a firewall issue.

Frank.

On 04/12/2010 06:01 PM, Michael Ni wrote:
yes my virtual host tag has 192.168.0.10:8886 <http://192.168.0.10:8886>

and the listen directive was Listen 8886
i have NameVirtualHost 192.168.0.10:80 <http://192.168.0.10:80> as well


for some reason its not detecting,

there is some logic somewhere saying, if port is not 80 and main
configuration is listening for port, redirect to that port,
if main configuration is not listening for port, do nothing

On Mon, Apr 12, 2010 at 2:56 PM, Jason Nunnelley <jason@xxxxxxxxxx
<mailto:jason@xxxxxxxxxx>> wrote:

   The conf VirtualHost must include the hostname and the port. You
   could just add * to indicate it should listen to all ports.

   I'm not sure what teh 8886 port has to do with your problem - not
   sure it has antyhing to do with it. You need a Listen *:80 or
   192.168.1.1:80 <http://192.168.1.1:80> for it to listen on port 80.



   On 4/12/10 4:51 PM, Michael Ni wrote:
   tried it, still doesn't work,

   i dont think it needs to be that specific right?

   Listen 192.168.0.10 should work.

   On Mon, Apr 12, 2010 at 8:07 AM, alin vasile
   <alinachegalati@xxxxxxxxx <mailto:alinachegalati@xxxxxxxxx>> wrote:

       in httpd.conf it shouldn't be

       Listen 192.168.0.10 <http://192.168.0.10:8886/>:8886?


       ------------------------------------------------------------------------
       *From:* Michael Ni <michaelcni@xxxxxxxxx
       <mailto:michaelcni@xxxxxxxxx>>

       *To:* users@xxxxxxxxxxxxxxxx <mailto:users@xxxxxxxxxxxxxxxx>

       *Sent:* Mon, April 12, 2010 5:39:42 PM
       *Subject:* Re: virtualhost not picking up for
       non port 80

       yes i have

       Listen 8886
       in the httpd.conf file

       i tried changing the private ip to localhost, it doesn't work
       as well



       On Mon, Apr 12, 2010 at 7:33 AM, Frank Gingras
       <francois.gingras@xxxxxxxxx
       <mailto:francois.gingras@xxxxxxxxx>> wrote:

           Michael,

           Make sure you have a corresponding Listen directive before
           your vhost as well for that port.

           Frank.


           On 04/12/2010 10:20 AM, Michael Ni wrote:

               i added log in virtual host
                  ErrorLog "logs/asdf-error.log"
                  CustomLog "logs/asdf-access.log" common

               when i tried again, nothing shows up on both

               i also did a httpd -S and got the following

               C:\Program Files\Apache Software
               Foundation\Apache2.2\bin>httpd -S
               VirtualHost configuration:
               192.168.0.10:8886 <http://192.168.0.10:8886>
               <http://192.168.0.10:8886>      is a NameVirtualHost
                        default server www.foobar.com
               <http://www.foobar.com> <http://www.foobar.com>


               (C:/Program Files/Apache Software Foundat
               ion/Apache2.2/conf/extra/httpd-vhosts.conf:52)
                        port 8886 namevhost www.foobar.com
               <http://www.foobar.com> <http://www.foobar.com>


               (C:/Program Files/Apache Software Fo
               undation/Apache2.2/conf/extra/httpd-vhosts.conf:52)
               Syntax OK

               but it just won't pick up for some reason


               On Mon, Apr 12, 2010 at 7:12 AM, [triplepack] info
               (info@xxxxxxxx <mailto:info@xxxxxxxx>
               <mailto:info@xxxxxxxx <mailto:info@xxxxxxxx>>)

               <info@xxxxxxxx <mailto:info@xxxxxxxx>
               <mailto:info@xxxxxxxx <mailto:info@xxxxxxxx>>> wrote:

                  Am 12.04.2010 16:00, schrieb Michael Ni:

                      I'm having difficulty on windows XP getting a
                   virtualhost to work
                      with non port 80.
                      it works when i use port 80 in the virtualhost
                   but doesn't work
                      with other ports.
                      i have turned off my firewall, although this is
                   private ip,
                      shouldn't matter
                      i have tried ports 8080, 8888, 8000, and now
                   with 8886.
                      when it doesn't match my virtualhost, it will
                   redirect to the main
                      configuration servername automatically
                      if i turn off the all other "listen" and only
                   keep "listen 8886",
                      i will just be unable to connect
                      i have searched all over the internet but i
                   can't find the solution.

                      hope someone can help.

                      the following is my config

                      WINDOWS HOSTS FILE
                      ------------------------------------
                      192.168.0.10 www.foobar.com
                   <http://www.foobar.com> <http://www.foobar.com>



                      HTTPD.CONF
                      ---------------------------------------
                      Listen 8886

                      HTTPD-VHOSTS.CONF

                      NameVirtualHost 192.168.0.10:8886
                   <http://192.168.0.10:8886> <http://192.168.0.10:8886>


                   <VirtualHost 192.168.0.10:8886
                   <http://192.168.0.10:8886>
                   <http://192.168.0.10:8886>>


                   <Directory "C:/Program Files/Apache Software
                      Foundation/Apache2.2/htdocs">
                          Options Indexes FollowSymLinks
                          AllowOverride none
                          Order allow,deny
                          Allow from all
                   </Directory>

                         ServerName www.foobar.com
                   <http://www.foobar.com> <http://www.foobar.com>


                         DocumentRoot "C:/Program Files/Apache Software
                      Foundation/Apache2.2/htdocs"

                   </VirtualHost>


                  Hi Michael,

                  1) it would be interesting what you see in the log file

                  2) as soon apache is started it would be
               interesting if its really
                  listening or actually something else is listening
               on that port

                  you can check this with a simple telnet connect to
               your ip and port
                  and see if you get a connection working - where
               ever it would go

                  greetings

                  aaron



           ---------------------------------------------------------------------
           The official User-To-User support forum of the Apache HTTP
           Server Project.
           See http://httpd.apache.org/userslist.html> for more info.

           To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
           <mailto:users-unsubscribe@xxxxxxxxxxxxxxxx>

           "   from the digest:
           users-digest-unsubscribe@xxxxxxxxxxxxxxxx
           <mailto:users-digest-unsubscribe@xxxxxxxxxxxxxxxx>

           For additional commands, e-mail:
           users-help@xxxxxxxxxxxxxxxx
           <mailto:users-help@xxxxxxxxxxxxxxxx>





   --

   Jason A. Nunnelley
   +1 2562971652

   http://www.google.com/profiles/imjasonn

   [Member Tekany, LLC]



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.

To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
 "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux