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

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

Related

Unable to connect to phpMyAdmin via SSh tunnel on Bitnami LAMP stack

I've tried searching for a solution to my problem both here and elsewhere online but I've come up empty, so I'm hoping someone can help. I must initially point out this issue has shown that this area is a complete blind spot for me, so I'm sorry if I'm missing something blatantly obvious, or I'm not explaining thoroughly enough.
I'm trying to access phpMyAdmin on a Bitnami LAMP stack via SSH tunnel, as per guide here: https://docs.bitnami.com/virtual-machine/components/phpmyadmin/. I seem to be able to establish the SSH tunnel, and everything looks correct in the PuTTY event log in terms of opening connection for forwarding, etc, but when I try to navigate to http://127.0.0.1:8888/phpmyadmin in a browser as stated in the guide, I am returned the error 'This site can’t be reached. 127.0.0.1 refused to connect.' After I receive this error I check the PuTTY event log and it shows 'forwarded port closed'. Is anyone able to provide me with some troubleshooting steps I can go through or possible solutions for what the problem may be please? Again, if I've not provided enough information please ask and I'll do my best to update what I can.
For background, I am the nearest thing to an IT lead for a GP and this LAMP stack is used for an online system accessed by both patients and staff for a specific health condition. It was independently created by a GP who has since left the practice, but before doing so he imparted onto me what we thought to be enough information/instruction to keep the system "ticking over" until we found a developer to produce a new one (I'm struggling to get in touch with said GP, so currently asking for their help isn't an option). It is a Bitnami LAMP stack created in Microsoft Azure, and has recently developed a SMTP authentication error whenever a patient/staff member needs to request a new or reset an existing password. I am attempting to access phpMyAdmin to check/reconfigure the SMTP server settings in the hopes of rectifying the situation. I do have some systems experience, previously working as a System Analyst/Technician for a hospital, but as I previously stated this area (servers, etc.) are a bit of a blind spot.
Many thanks to anyone willing and able to help.
Bitnami Engineer here,
It seems that the SSH tunnel was not properly created and that's why you can't access phpMyAdmin now. You can try to reconfigure the port forwarding configuration again or you can edit the Apache's configuration to allow remote requests from your IP to the phpMyAdmin application. To do so:
Edit the /opt/bitnami/conf/bitnami/phpmyadmin.conf file and substitute the Require local line with Require ip YOUR_PUBLIC_IP.
If you do not know your public IP, you can access http://myip.bitnami.com to get that information
Restart Apache and access phpMyAdmin using http://MACHINE_IP_ADDRESS/phpmyadmin

What would cause apache to redirect from a local IP to a remote IP address

Here's a scenario that I can't figure out; I simply can't understand why an slightly oldish webserver (totally inactive/powered-off for 2y) is behaving this way. I MUST be overlooking something quite simple.
Specifically, when i try to access an Apache instance on Centos 7 residing on my local network (192.168.2.XXX), the apache page responds just fine (Testing 1,2,3; Yay). Watching the access logs on this simple request shows up fine. On this same machine, I have four additional paths set up. One for example is a locked down phpMyAdmin that is accessible only from an internal IP. This route works fine, and the databases can be browsed, etc. Yet, for the other route, such as a wordpress installation or a route to a Magento instance, the the request comes up on the access log (no error log entry), and then just sits there. When the request finally times out, the URL in the browser changes to a new ip address (ABC.XXX.YYY.ZZZ), and then terminates any efforts.
Admittedly, the machine WAS originally configured to be outward facing, and my suspicion is that the IP to which the pages revert may have been the public IP last time the machine was alive. the IP is no longer associated with the site, and the domain which was likely setup with that IP address, is also no longer active.
Does anyone have any suggestions as to what I may look at? I have combed the httpd configurations and there is nothing resembling any such redirection address. Could there be some DNS data that needs to be flushed? A network configuration in sysconfig/ that I am overlooking?
It was nothing to do with my apache configuration. Everything was related to the site urls that were embedded inside the wordpress and magento installations. Upon finding and replacing all instances of the site IP address in some configuration tables, I was able to get both applications to respond properly.

err_name_not_resolved Win7 Error

I am facing a strange issue on a single PC, all other PC's I have tried are fine so the problem definitely seems localised to this setup.
Windows 7
Google Chrome Version 48.0.2564.82 m
I have developed a simple website on an Apace web server (Windows Server 2012), and assigned it an internal IP address (1.2.3.4), and internal dns name (MyWebsite.MyDomain).
This website is only available within our company. When I type the URL MyWebsite.MyDomain into any browser I am presented with the correct web page, great. When I type the IP address 1.2.3.4 into any browser I am also presented with the correct web page, great again.
This is the case for every PC I have tried so far, apart from one. Instead I am presented with the following error message;
This web page is not available
ERR_NAME_NOT_RESOLVED
Why would this be?
Things I have tried so far on the local PC;
delete history/cache on local PC
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns
changed to Google public dns (8.8.8.8 / 8.8.4.4)
restart (multiple times)
tried IE and FFOX (same error)
checked hosts file (all looks ok)
The only change I ever made to this individual PC was I installed XAMPP and changed the hosts file (for testing purposes). I have since uninstalled XAMPP and reverted to the original hosts file - could this be the issue? I can't think of any other changes.
I had thought the issue was with my web server setup, but as the web site is accessible from all other PC's it would appear not?
Looks like a re-build may be necessary for this PC, unless somebody can perhaps point me to another suggestion? Any help appreciated.
That machine doesn't happen to have any static ip addressing configured, does it? I'm thinking that perhaps a manual entry for DNS server is conflicting or overriding what DHCP is supposed to be assigning.

How to access WAMP Server form everywhere?

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

Accessing Apache Server from the internet

I have installed Apache on Xubuntu and I am have a problem accessing it from the internet.
If I access it via localhost I can reach the home page plus pages in the subdirectory. How if I access it from the internet I can get the home page but nothing else. When I type in the subdirectory and page, no links at this point, It either never leaves the home page or gets rerouted back to it.
I have no .htaccess files in place, I have tried adding an alias and entries in the conf file and I have checked ownership and permissions. I have gone as far as wiping the machine and starting with the same results.
I feel like it is going to be a case of missing something simple but I cannot think of what. The log files have indicated that an IP tried to access the subdirectory but shows no error in doing so. When typed into the URL the /Directory/Index.html shows in the address bar but it displays the home page.
Can anyone point me in the right direction?
Thanks,
Most likely the issue is contained either in your apache.conf file or your firewall. I would have a good look at your apache.conf to see if there is anything restricting access to your sub-directories.
if you want to use default http port (80), so long story short www.abc.com without explicit port number, you must allow this on your server because 80 is privileged on most system, this could be a problem