0

I have installed xampp on localhost,and have installed wordpress on it(using port 8080),and have created a website on it.

I need to see that localhost wordpress site from another computer before loading it to a domain.I tried ngrok,but using that i could only get to the XAMPP welcome page.

How can I reach the wordpress site.

P.S. I access the wordpress site on my pc as localhost:8080/wordpress-trunk Please help

sjas
  • 18,644
  • 14
  • 87
  • 92
Srajan Soni
  • 86
  • 3
  • 12

3 Answers3

0

Take a look on your apache configuration, looks like it allows requests only from localhost. Your config should looks like

<Directory /APP>
    Allow from all
</Directory>

while now you have something like

<Directory /APP>
    Allow from 127.0.0.0/8
</Directory>

* EDITED *
Accordin description, your task is to access your web site from another local computer, rather then from internet. As I can see, you can access this computer (and you can see XAMPP welcome page), so you don't need to follow Tousif Osman's answer, the problem is in your settings.

Dmitry Meshkov
  • 921
  • 7
  • 20
  • Title states 'from the internet'. :) – sjas Jun 27 '15 at 22:10
  • Have you read a description? His real task is to access from another local computer. Also, he already can access this web server, and problem may be in apache settings. Edited my answer to clearify this. P.S. Thanks for commenting your downvote – Dmitry Meshkov Jun 28 '15 at 08:17
  • No offense meant, it was irony on my side since the OP obviously did not really knew what he was talking about. But you did not realize that either, still your answer was perfectly valid! I beg pardon for my sense of humor, I did not downvote your answer... now you will get an upvote so you see I am not lying. :) – sjas Jun 28 '15 at 14:46
  • @DmitryMeshkov : I have edited the config file according to you. – Srajan Soni Jun 29 '15 at 07:07
0

You can access your local site from local network. To do that you need to assign ip to your local server. You can check these links link1 link2

To actually visit you site from internet you'll need to buy services(ip and domain name ) from your isp. Your isp will have to assign the in the dns server they are using. That is you'll have to make your own web server.

If its just for testing purpose best option is to use free hosts

Community
  • 1
  • 1
Tousif Osman
  • 287
  • 2
  • 12
0

You can achieve what you want using your public IP adress, even if it's dynamic. First, you need to config a port forwarding in your router. To do this, enter in your router settings, go to port forwarding and there add the LOCAL IP adress from your XAMPP computer. Make sure to select type TCP and RANGE 80-80, because port 80 it's the default port for apache. Make sure you don't use Skype, which also use port 80.

After you did that, reset your router so the changes apply. Now, go to https-vhost.conf file and add something like this

<VirtualHost *:80>
    #ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "path to your wordpress directory"
    ServerName your public IP
    ServerAlias your public IP
</VirtualHost>

After that, go to hosts windows file (System32/Drivers/etc/) and add your IP twice. So, it should look something like this:

localhost       localhost
YOUR PUBLIC IP  YOUR PUBLIC IP 

Don't forget to replace YOUR PUBLIC IP and path to your wordpress directory. Now, restart your apache service. I recommend you to perform a clean wordpress instalation in your wordpress directory and use YOUR PUBLIC IP for the website URL.

Briefly, this is all about it. I'm here if you have questions or problems!

Dragos Sandu
  • 664
  • 3
  • 16
  • Sandhu: Thnks for your advice. 1. I entered a port forwarding setting to my router....and my port is 8080...so this was done..2.i edited the https-chosts.conf file and added : DocumentRoot "C:/xampp/htdocs/wordpress-trunk" ServerName sssd.local 3. hosts file configured as :127.0.0.1 localhost 210.212.156.xxx(my static global ip) sssd.local now when i enter 210.212.156.xxx in my address bar : i get : ERR_CONNECTION_TIMED_OUT What to do now?? – Srajan Soni Jun 29 '15 at 07:15
  • You need to edit https-**v**hosts.conf file. What is sssd.local? Your Server Name should be also your PUBLIC IP. In your HOST file you should have 210.212.156.xxx instead of sssd.local. Same in the vhost file. After this, perform a clean wordpress install in your wordpress-trunk folder – Dragos Sandu Jun 29 '15 at 07:17