SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post virtualhost problem port 9090

    Hi, I need some help please i am changing the port to listen 9090,I want to create virtualhost for my site but i am confuse in the host file what should i put there

    127.0.0.1:9090 mysite

    is that valid?


    and in the httpd-vhosts.conf i put something like this


    Code:
    <VirtualHost  *:9090>
        ServerAdmin admin@mysite
    	DocumentRoot "C:/wamp/www/testsite"
    	ServerName mysite
    	ServerAlias www.mysite
    	ErrorLog "logs/mylocalsite-error.log"
    	CustomLog "logs/mylocalsite-access.log" common
    </VirtualHost>


    it's not working when i tried to type in the url like this

    http://mysite

    please help me.

    Thank you in advance.
    Last edited by ScallioXTX; Oct 19, 2013 at 15:30. Reason: de-linkified example URL

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,084
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    If you use port 9090 the URL becomes http://mysite:9090. If you leave out the port number browsers will assume port 80 for HTTP and port 443 for HTTPS, which is why that works. For everything else, you must supply the port number in the URL. There is no way around this.
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi ScallioXTX, but the problem is that i could not access anymore my phpmyadmin,if i type this in url localhost:9090 this will show my site.

  4. #4
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,084
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    What URL are you using for phpMyAdmin and what is the vhost configuration?
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  5. #5
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi ScallioXTX,


    I mean the wampserver index the listing directory....

    <VirtualHost *:9090>
    ServerAdmin admin@mysite
    DocumentRoot "C:/wamp/www/testsite"
    ServerName mysite
    ServerAlias www.mysite
    ErrorLog "logs/mylocalsite-error.log"
    CustomLog "logs/mylocalsite-access.log" common
    </VirtualHost>
    Quote Originally Posted by ScallioXTX View Post
    What URL are you using for phpMyAdmin and what is the vhost configuration?

    If i will do this http://mysite:9090 it open my site.

    and if i will type in the url http://localhost:9090 still it opens to mysite...it should be the listing directory of the wampserver.

  6. #6
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,084
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    That's because your using VirtualHost *:9090. Make that VirtualHost mysite:9090
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  7. #7
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,634
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    That won't quite help -- you still cant go to http://mysite:80 and get http://mysite:9090.

    Now that you are out on custom ports you don't need to mess with host files or host headers -- just hit http://localhost:9090

  8. #8
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Still doesn't work...

    Quote Originally Posted by ScallioXTX View Post
    That's because your using VirtualHost *:9090. Make that VirtualHost mysite:9090
    This is what i put in my hostfile

    127.0.0.1 mysite:9090

  9. #9
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,084
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Remove the :9090 from your host file
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  10. #10
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Nothing happens, it will still open to mysite if i will use this url http://localhost:9090,it should be open to the index of my wampserver.

    Quote Originally Posted by ScallioXTX View Post
    Remove the :9090 from your host file

  11. #11
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,084
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    In your Apache config file (httpd.conf), change VirtualHost *:9090 to VirtualHost mysite:9090. That is, replace * with mysite.
    Right now that vhost is listening on port 9090 for any domain name, which is not what you want, since it should only listen to mysite.
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  12. #12
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yup i also do that but still i could not open the wampserver,i already followed your suggestion...

  13. #13
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,161
    Mentioned
    152 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jemz View Post
    Yup i also do that but still i could not open the wampserver,i already followed your suggestion...
    Did you add 127.0.0.1 mysite to your hosts file (assuming you are running this all locally and you don't have a domain pointed to your PC)?

  14. #14
    SitePoint Wizard
    Join Date
    May 2012
    Posts
    1,107
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yes,I already done putting the 127.0.0.1 mysite but still it will not open the index of my wampserver...it will open to my local site.


Bookmarks

Posting Permissions

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