How to access WAMP Server form everywhere? - apache

I just created my first homepage in the last weeks and now I want it to show it to my friends.
I am using WAMPSERVER 2.5 and followed A LOT of guides but nothing really worked for me.
First of all I am new to this, I have no idea how all this accessing works exactly. I guess I point out how I understand that it should work.
On my PC where I wrote my htmls css php and so on I can access via
localhost:8080/foldername/homepage.php
Okay I changed the port from 80 to 8080 cause a lot of guides recommenced it.
A few days ago I was able to reach this with my local IP
192.168.2.103/foldername/homepage.php
or something like this
I have no Idea how I did that and at the moment it doesn't work anymore.
My httpd.config file is also pretty messed up (and too long to post here), maybe I should reinstall WAMP.
Okay to come back to my question: If I set up everything correctly will I be able to access my homepage on my PC via
http://IPv4-address/homepage.php
like http://91.11.87.45/homepage.php
without buying a domain and only having WAMP installed? The page is intended not to be online 24/7 only when I and my friends need it, or WAMP is always online when my PC is powered.
I already did
- "Put Online"
- portforwarding on router and firewall
- turned off firewall/antivir
- changed httpd.conf and httpd-vhost.conf accordingly to the guides I read
- tried every combination of ips and ports to access homepage.php
and now I am out of Ideas. But I guess I'm not the only one with problems, because all those guides comments where full of questions and problems^^
I hope I explained the problem well enough :P

When you access it from inside the same network, you would still need the 8080:
192.168.2.103:8080/foldername/homepage.php
But if you are outside the network, it would depend on how your port is forwarded. If you have port 8080 forwarded to 192.168.2.103 port 8080, then you would need:
http://91.11.87.45:8080/foldername/homepage.php (also folder name would still be same as if it were localhost)
If on your router you have port 80 forwarded to 192.168.2.103 port 8080, then
http://91.11.87.45/foldername/homepage.php
should work, but some routers are funny and can only do the in port as the same as outport, just to a specific internal address.
so if you can do:
localhost:8080/foldername/homepage.php
and can also do:
192.168.2.103:8080/foldername/homepage.php
but CAN'T do:
-http://91.11.87.45:8080/foldername/homepage.php
OR
-http://91.11.87.45/foldername/homepage.php
then the trouble is in the port forwarding of the router.
If you CAN'T do:
192.168.2.103:8080/foldername/homepage.php
Then sounds like something in WAMP config

Related

Use Windows 2016 server with Xampp to host more than 1 website

I have tried all kinds of things, read all answers, and configured the bananas out of it, but I cannot seem to get the following working:
A windows 2016 server with XAMPP, to host more websites than 1.
What have I done:
I have altered the httpd-vhosts.conf as described all over the web with allowing NameVirtualHost, and setting up virtual host with documentroot, servername etc.
I have pointed a domain with the a-record to this server
installed the latest XAMPP release to date
changed the windows hosts file, as described everywhere (127.0.0.1 domainname.com)
What works:
I can get the domain working on my server's browser. When I enter the specific domainname.com it shows the hello world page I made in the specified folder. The domain resolves and shows the page that is in de directory accordingly
Besides that, the localhost of apache is also working, I have 2 sites working, but only on the browser of the server, on the machine itself.
What does not work:
Only 1 thing. when I want to access the domain from any other machine than the server (from outside so to say), it will not work, but when I ping the domain on my home-pc it resolves to the server.
I am at a loss. Been at this for hours, and beginning to question if it is even possible.
Can anyone tell me what I am doing wrong here, or if it is even possible to have more than 1 website to work on XAMPP and resolve form the outside?
Thank you in advance.
It was windows firewall that stopped all inbound connections. I finally figured it out!

Virtual server on virtualmin keeps redirecting to wrong website

I have created a virtual server say aaa.com but when I access the site (via editing my hosts file on Windows 7, cos I have a live aaa.com running on the Internet), it brings me to my other virtual server's site I have, like bbb.com
Why is that? I don't have any redirection running. Not in my script files (like html or php) and no redirection set under "Server Configurations" -> "Website Redirects" and none at "Services" -> "Click Configure Website" -> "Aliases and Redirects." The only script files I have are fresh new WordPress installation files (under home/aaa/public_html).
How do I fix this?
Mullazman is right (thanks!). I have just had this problem after enabling the SSL on the domain A. Then, all the domains in the same installation were pointing to A.
I fixed it by editing the file located in /etc/apache2/sites-enabled/A.conf and changing the first line:
Wrong line -> <VirtualHost A.B.C.D:80>
Correct line -> <VirtualHost *:80>
Had the same issue. For anyone interested it's because I had at the header of my sites-enables/aaa.com.conf which was picking up all requests and send them to the first host.
Change it to and it started directing traffic to the correct virtual hosts.
It was triggered when I enabled SSL on aaa.com, it for some reason re-wrote the config file to use IP based filtering not domain name
Try to delete browser cache with CTRL+F5,
then try again. If that doesn't help, check virtualhost configuration files -maybe there lies the problem.
The solution I found
I had the same problem ...
And I ended up with a lot of doubts ...
And I searched for a SOLUTION for this case, I hope to help ...
1 - Should the BIND have an external or internal IP in the domain? I use only one IP for all servers, and in BIND all domains are with external IP. (The question is whether it should be external or internal IP).
R = Yes, you must configure the internal IP in Virtualmin, prefer to edit the file. Only in localhost you should have 127.0.0.1
2 - Would NGINX have any configuration? How to remove IP and just put (listen *: 80) instead of (listen 288.218.198.981:80)
R = This configuration was changed but then I had problems with DNS and I returned to use the INTERNAL IP (not the localhost) ... Normally this IP starts as: 10.1xx.xx.xx
But which configuration would work in general?
Restart these steps ...
If you still have an error ...
Back up ... And in Virtualmin settings ...
Edit Virtual Server >> Activate Features >>
Uncheck NGINX, BIND, NGINX SSL.
He will ask for confirmation and click to confirm.
After this process is completed, return to the same option and reschedule ...
This will make it delete the old ones and put a new one.
(This works great for those who changed hosting and has old settings).
If you are importing a backup. Do not select the DNS and NGINX option ...
One tip is to create Virtual Server {your domain / site} First of all ...
And only then only import directories and databases ...
So you will not have problems with DNS and wrong redirects ...
Update
This also occurs when the SSL certificate is not issued correctly.
Folder permissions are incorrect.
Chmod 0755 folders
0644 Files
SOLUTION!!!
Cheap workaround let us say our domain is domain.xyz
Under the BindDNS Master Zone for domain.xyz create a cname record I believe it is listed in webmin as Name Alias and name it 000.domain.xyz
Under apache create a virtual server with the name 000.domain.xyz and make sure it has the same directory as domain.xyz
After this is done you are golden all your websites will come up as they should!
Is it proper well maybe not.
Does it work well like a charm of course otherwise I wouldn't be sharing for some reason the way the severs are listed it defaults to the first on the list well that'll fix that there should be a method of pinning the servers or doing something to prevent such a thing from happening what a pain in the rear I spent a full day dumbfounded thinking what in the world is going on I am losing my touch.
If this helps give a like if its wrong apologies all I know is that it works.
Read the thread.
Many folks claim this is an SSL thing.
Zero people have eluded to the true method of fixing it or the proper directions to do so or if they did I'm too blind to see it.
The guy below me commenting hrmmm... Yeah browser caches for my website didn't exist on my devices I tried them on to verify that was not the problem. But yes this is a typical problem with a lot of things indeed. It is the only reason I have several browsers on my PC actually for that reason. For a while there there were pages that chrome would function with that IE wouldn't or Firefox would best them both. Not to mention cache is always a pita its always usually one of my steps in troubleshooting any issues with web pages. I'll even try openDNS or other DNS servers.
But holy cats I can't believe how fast DNS just updates once you got things set it makes me wonder if there is a lot of fudge in propigation when you purchase hosting being "24 -48 hours" I think there is a lot of fudge in those numbers after my experiences trying to figure out what was causing the issue here. Some servers struggle yes but for the most part it was pretty instant for me.
In my case it happened after creating SSL certificate, I forgot to do:
Edit Virtual Server -> Enable Apache SSL Website

Public IP Web Page "Connection Timed Out" When Connected To

Recently, I made a website server on my server PC running Windows 7. I used WampServer, and I configured it as follows:
Download and install WampServer.
Check http://localhost (worked).
Program out the HTML files necessary.
Put it inside of the 'www' directory (the default directory of WampServer for HTML files)
Go to http://localhost to see if it worked (yes, it did). Then right click WAMP notification and "Put online".
Go to my main PC and go to http://[local-ip-of-server-computer] to see if it worked. It did.
Now, I configured the httpd.conf to "Request all granted"
Next, I went on ahead to port forward. My router is Frontier Netgear router.
I went to 192.168.254.254 (Frontier's router addresss) > Firewall Settings > Port Forwarding > Add
I selected "World Wide Web (HTTP)" and "OK".
Then I went to the menu and to "DMZ Host". I enabled my server computer for that.
With my main PC, I went on ahead to my public WAN IP mentioned on the router page. It didn't work.
Whenever I try to load my http://[router-public-wan-ip], Google Chrome gets a "Webpage not avaliable. ERR_CONNECTION_TIMED_OUT"
I have port forwarded on my server PC's Windows Firewall.
My httpd.conf is set to be on port 80. Also, I have changed my ServerName to [local-server-computer-ip]:80.
Can anyone provide any advice? Thanks.
This was my mistake. The solution to this problem is that, well, there was no problem at all. I simply hadn't realized that external IP addresses cannot be accessed by their own servers - one inside of the server LAN has to use the server computer's local private IP address.
I sincerely apologize. Thank you to all who contributed.

Can only access computer IP 192.168.1.3 sometimes (localhost always works)

I have a problem, and maybe I don’t know what do search for, but I haven’t been able to find any threads with a similar problem. So I hope that any of you can point me in the right direction or suggest a solution.
I have a wampserver running on localhost, and I have created a database and a webpage that is using this. When I enter localhost/myproject in the browser the project is displayed. I need to access this site from another device on the same network though, and for that reason I need to use the IP Address of the computer hosting the server (this is 192.168.1.3).
The problem is, that the computer IP is only accessible sometimes. Meaning – if I enter 192.168.1.3/myproject in the browser window, sometimes it will display the webpage as it should while other times it won’t. It either gives me a message of something like “runtime out” or it just keeps trying but never does anything. I can always get access to the router using the IP 192.168.1.1, and here I see the computer 192.168.1.3 even when I can't connect to it.
A while ago I changed the Apache file httpd.conf and added “Allow from 192.168.1.3” under Directory. I did this because I got a message of “access denied” when entering the IP in the browser, and I found a thread posting this solution – which worked. I also created an exception for port 80 in the windows firewall in this process.
I don’t know what to do now though. Any help/suggestions would be very much appreciated, thanks.
Try to increase timeout intervals in your php.ini file
If sometimes it's works, and sometimes - no, problem in timeout

Basic apache server, mapping 127.0.0.1, to 10.0.0.7:8000

I'm working on this project where the client has a virtual server setup. I installed apache and such and got everything working fine on localhost. But in order for it to show up on the internets, the people that run this virtual server needs me to:
"If you try and reach 10.0.0.7:8000 you do not come to the index page but if you do localhost the index page is shown. You need to configure so that it listens to it´s Local IP 10.0.0.7."
Now I am kinda new to this court (I am just a simple webdev that likes to put everything together localhost and uploads his stuff with regular ftp). I bet the answer is simple, but their hotline is closed because they are accross the atlantic. Can someone tell me how to go round and do this? (I am almost blushing because for my not knowing). The virtual server is running on Windows 2003 OS
I believe you should find it relatively easy to do: Listen Directive
Go to the httpd.conf file in your apache/conf dir and change the port and address in the listen directive as:
Listen 10.0.0.7:8000
Don't forget to restart the service.