How do I access my own website hosted in my machine? - apache

Forgive me if this is a stupid question.
I am running XAMPP (lite) for developing my website. I can access it through http://localhost/mysite
I wanted to view it on another computer (just for testing purposes), so I went to whatismyip.com, got my ip address, and tried to access the site from another computer using http://xxx.xxx.xxx.xxx/mysite
Am I doing it right?
Anyway, I get a "Enter your username and password" prompt. I've tried the following usernames and their passwords: 1) My computer name 2) My windows login username 3) My database username
None of them worked. I already have my firewall OFF.
Any ideas?

If you are behind a router, then the credentials you are prompted for are those of the router.
You will have to setup your router to forward HTTP traffic (port 80) from outside to your PC if you want others to view the site.

Apache might only be binding to localhost. Open up a command prompt and do a netstat to see what address is being bound to on port 80. While you are at it, do an ipconfig /all to see what the IP address is of your machine. If you have a DSL/cable router, you probably have a private IP address which by default isn't accessable from the internet unless you setup port forwarding. If you want to access your computer from inside your home network, try accessing it using the IP you got above. If you want to access your computer from the outside, read the documentation for your cable / dsl modem / router to see how to setup port forwarding.

Related

Host web on local machine use xampp

I want to access my website hosted on local machine on htdocs in xampp, I want to access it using an IP address, How can I get it where like:
https://locahost/
and can I get using an IP address?
can you help me the best tutorial link easy step by step to make it on window 10?
http://localhost:port like http://localhost:8080 i think. You need to specify a port.
You can access your XAMPP website using the following web addresses in the device it is hosted on, usually:
http://127.0.0.1:80
And
http://localhost:80
To access your website from your smartphone or another PC, you will need to access it using your local IP address assigned from your router. Run ipconfig to see it:
You will need to find the line in the output, like: IPv4 Address.........: 192.168.0.123
For port 80 and 443, you do not need to type the number after the address, i.e. :80 or :443. If you are using other ports, you will need to specify them.

Cannot acces to my website through my company LAN network

I am trying to publish a website using a wamp server v3.0.6 located on my own PC. I can access the site from my PC using the domain name "mysite.com" and ignoring the proxy for this site. The problem is that I can not access from other PCs that are on the same LAN network of the company. When I enter "mysite.com" in the browser of another PC without a proxy, an "Unable to connect" message is displayed, and with proxy, it leaves :
Network Access Message: The website can not be found.
Error Code 11001: Host not found
Background: This error indicates that the gateway could not find the IP address of the website you are trying to access. This is usually due to a DNS-related error.
The firewall of my PC is turned off.
What could be the problem?
mysite.com is a domain name. I don't know how you have managed to direct this name to your local machine (editing the hosts file is the simplest approach for that), but you have to make all other computers know about the name-ip pairing you have used. And you need to pair the name with an address that is visible to others (localhost won't do it). If you have a machine that is part of a corporate infrastructure, you might already have a canonical name for your PC, like pc00144.yourcompany.com. If there is no firewall on your PC or the port you are using to serve the web content is open, then all who can ping your pc should be able to connect to your site. If it is the only site in your wamp and it is not configured to use virtual hosts, than it should be connectable by IP also.

Vagrant Virtualbox Webserver, Cannot access from external network

I am having an issue and I am not sure where to go, hopefully you guys can help me out here.
I have a virtual box machine that has a bridged network, therefor the device is on my LAN and there is network connectivity to the device.
I can connect to the web server using my local ip adress 192.168.2.41:25878, however when I try to connect to it with my public IP address x.x.x.x:25878 the web browser is waiting for a connection but it never seems to establish.
Here are my config files for Apache2 / Vagrant
VagrantFile - https://gist.github.com/anonymous/7cca95da3cfc22de5333
Apache2 Site - https://gist.github.com/anonymous/d60efd938d9d7d7de60e
Ports.conf - https://gist.github.com/anonymous/8b0c20a78b36cc5d03b0
The port forwarding is correctly set up on my router. What is really puzzling me, is that I am able to connect to the web server using the local IP address 192.168.2.41:25878, however I cannot access it via the public IP address. The web browser is not rejecting the connection, so I am assuming that I have a config error somewhere, specifically in apache.. The web browser shows a spinning wheel when trying to connect.
I've been trying to solve this issue for almost a week now.. I would appreciate any help that you guys may provide.
SOLVED
So I am not sure why the setup above was not working... I changed from bridged networking to NAT and setup host to guest port forwarding through Vagrant (VirtualBox) and it started working!
I also switched to Nginx instead of using Apache.

how to access local web application on glassfish server from internet?

I have created a web application in glassfish and I can access it on my LAN.
How can I access the web application from a remote location over internet?
I do not have static IP.
Please reply.
Thanks.
Steps :
Creating virtual DNS(Domain name server) Server on your machine.
Port Forwarding.
Reference https://cookbook.fortinet.com/port-forwarding-60/
Remote Desktop Connection enabling.
Creating Inbound Rules. Reference :
https://www.howtogeek.com/112564/how-to-create-advanced-firewall-rules-in-the-windows-firewall/
Creating account on www.noip.com and create custom host and download DUC (Dynamic Update Client) Software.
Some more steps may have it depends on your LAN Router and firewall configuration.Use http://ifconfig.me/ to get your public ip.
Access from outside your machine should be configured by default. You may check if it is so in admin console, at Configurations->server-config->Network config->Listenters. There should be one listening on the desired port (like 8080) and be bound to 0.0.0.0 address.
To easily access something behind a dynamic ip you need something like http://www.noip.com/ or http://www.dnsomatic.com/ (I took these from my router's control panel)
I did this recently,
first you need to use port forwarding on your router, access it by typing your default gateway path, mine was 192.168.0.1 then go to "advanced settings -> Port forwarding". Simply enter the details that are asked for, I set mine to HTTP using port 8080, yours might be different. Protocol is TCP. The IP address it asks for is your local address.
For quick testing you can disable the firewall on your machine and then you can search on google for your Public IP address by typing "what is my IP".
Then type your ip into the browser and the port number "ipAddress:portNumber"
You should see the glassfish welcome screen if it is successful.
After that you might want to enable your firewall again but then you have to add an inbound rules to allow the port to be used:
Setting Windows inbound rules
Then you still have one last step to perform, allowing glassfish to access the resources on your machine: Adding glassfish to allowed programs
Follow the instructions on adding java.exe only.

Access wamp server outside, not only inside

I configured my wamp server to access it online. I add the port 80 in my router, I clicked on the online button in the wamp tray icon. I changed the information from the httd.conf file, but I can only access it from inside my network. For example, with my iphone, I can access it only when it's connected on my wi-fi. With the 3G, an outside network, the server just time out and doesn't respond.
Please can you help me, I need that quick please,
Thank you,
Cedric
Are you accessing via a public IP address (not a LAN IP)?
Did you also configure Windows Firewall to unblock incoming port 80 requests?
If so, and everything else is correct, your ISP/provider might be blocking incoming port 80 requests.