Results 1 to 4 of 4

Thread: There is any way for config virtual host on wamp to open my site like as aaa.com?

  1. #1

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    579

    There is any way for config virtual host on wamp to open my site like as aaa.com?

    Hello, I have two questions:


    I wana test my website offline on pc using wamp and mobile connected to wamp , so my questions :


    1- I want to open my website for testing with the internet address of aaa.com, I was able to get a test in the form of www.aaa.com with the following method on virtual host settings in wamp :


    Code:
    <VirtualHost *:80>
    
    
        ServerName www.aaa.com
    
    
        DocumentRoot "h:/html/new/code"
    
    
        <Directory  "h:/html/new/code/">
    
    
            Options +Indexes +Includes +FollowSymLinks +MultiViews
    
    
            AllowOverride All
    
    
            Require all granted
    
    
        </Directory>
    
    
    </VirtualHost>

    But if I want to open the site in the form of aaa.com, it does not work for me with the following method:

    Code:
    <VirtualHost *:80>
    
        ServerName aaa.com
    
        DocumentRoot "h:/html/new/code"
    
        <Directory  "h:/html/new/code/">
    
            Options +Indexes +Includes +FollowSymLinks +MultiViews
    
            AllowOverride All
    
            Require all granted
    
        </Directory>
    
    </VirtualHost>
    How Can Solve this problem ?



    2- I test my site offline on the computer with the address www.aaa.com and there is no problem, but when I want to test it on a mobile phone this address does not open . Is there a way for me to test it with www.aaa.com or aaa.com not like as localhost/aaa??
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

  2. #2
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,205

    Re: There is any way for config virtual host on wamp to open my site like as aaa.com?

    Up front, I know zero about wamp. But if you are on your phone and wanting your phone to be able to access your PC via a domain name of www.aaa.com, then that sounds like a DNS issue to me.

    Not going to go down the rabbit hole of different suggestions based on all the possible different permutations of how your LAN is set up, or if you are even using local DNS or not.

    Bottom line, it might be complicated, it might be easy, it might not be possible with your current setup. I will offer no further follow-up to this post. Good luck.

  3. #3
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,621

    Re: There is any way for config virtual host on wamp to open my site like as aaa.com?

    Maybe you can set your host file to auto redirect?
    See here:
    https://superuser.com/questions/4875...pache-and-wamp
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  4. #4

    Thread Starter
    Fanatic Member Black_Storm's Avatar
    Join Date
    Sep 2007
    Location
    any where
    Posts
    579

    Re: There is any way for config virtual host on wamp to open my site like as aaa.com?

    A few minutes after I asked my question here, I found a part of the answer here :
    wamp - how to open live website on same computer if virtual host has same name - Stack Overflow
    i just added these lines in C:\windows\system32\drivers\etc\hosts :
    Code:
    127.0.0.1 aaa.com
    ::1 aaa.com
    and then in httpd-vhosts.conf i added :
    Code:
    <VirtualHost *:80>
        ServerName aaa.com
        DocumentRoot "h:/html/new/code"
        <Directory  "h:/html/new/code/">
            Options +Indexes +Includes +FollowSymLinks +MultiViews
            AllowOverride All
            Require all granted
        </Directory>
    </VirtualHost>
    now i can test my site on windows like as aaa.com nice, but another part (question 2) still remains, and that is that I want to test the website address on the mobile phone when it is connected to WAMP like as aaa.com :
    Notic : there is no need any interent connection because its connected to wamp as its work nice on windows but i just stuck on mobile now.
    Name:  001002.jpg
Views: 39
Size:  13.7 KB
    [ ... active on skype and discord ... ] ,[always strive to achieve your dreams] , [always try,dont stop,never say never]

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width