Laragon, laravel. my virtual host cannot work on my PC - laravel

Anyone can helme? i get problem whit virtual host
This is my problem

I solved that issue as follow
Menu -> Apache -> sites-enabled -> delete all (auto)
C:\Windows\System32\drivers\etc\hosts right click -> properties on hosts file and uncheck the "Read-only"
make sure auto virtual host is checked on laragon
restart laragon and try your project folder name inside in www with .test (or as specified in laragon setting) in the browser

This question has entirely insufficient details to help you in any meaningful way. However, if I had to guess, I would say there are couple of possible reasons:
Your DNS for is not configured properly for online-shop.dev. Note, .dev is an actual top-level domain, owned by Google and reserved for their own use - https://icannwiki.org/.dev, so it's likely you are trying to follow some advice how to setup .dev for local development, but Firefox is actually looking against the real .dev DNS servers.
Assuming your DNS is indeed properly configured (in which case you happen to work for Google, and you just accidentally leaked their Amazon competitor :-)), it is possible that your app server is not running. It's impossible to say by the screenshot.
Assuming that the DNS and the app server are configured and running properly, it's possible your firewall is blocking port 80.

Related

Set up a simple go server in a webhost

I wanted to set up a simple go server in a webhost. I acquired a domain mydomain.com and hosted it using Bluehost. Now, going through the Go tutorial, I went through this example http://tour.golang.org/#59 and it works fine on my machine. Now, instead, I want to make the HelloWorldServer work when I call mydomain.com:4000 or some other port.
What I did was ssh to my server at bluehost, install go there, then compile the server and run. But then I try to access mydomain.com:4000 and it is not found. I also tried to change "localhost:4000" to just ":4000". any ideas how to make it work ?
Any help or pointers are appreciated. (some more details: it is a shared-hosting account)
This is due to the firewall on your BlueHost server not having ports (including 4000) open on a shared hosting account, Firewall Port Restrictions
If you want to do some simple (and not so simple) web hosting, why don't you look at Google App Engine

Self Hosted WebApi Accessible over LAN

Very new to the Self Host WebApi, but I am very impressed with its ease of use and extendability. At least through this tutorial. Everything I've done so far works on my development machine whether I use localhost, 127.0.0.1, or my LAN Ip (192.168.0.x) but I am baffled why I can't access the service from any other computer even others in the same subnet.
In short after going through the tutorial on the machine where it is running:
Browsing to
localhost:3636/api/products/
results in the expected xml return.
On another machine on the LAN browsing to:
192.168.0.x:3636/api/products/
results in a timeout
Data points for those who might know how this all interacts:
1.) My dev machine(192.168.0.x, server, host whatever you want to call it) has IIS on it; I was so paranoid it was in the way that I stopped it via the Administration GUI
2.) I have reserved the URL/Port with the following command line executions:
>netsh http add urlacl url=http://+:3636/ user=DOMAIN\USER listen=yes delegate=yes
>netsh http add urlacl url=http://192.168.0.x:3636/ user=DOMAIN\USER listen=yes delegate=yes
2.b) I've tried both of those together and individually, and tried changing the user to "everyone" to no avail
3.) I have tried to change the code in the tutorial to set the
config.HostNameComparisonMode = HostNameComparisonMode.Exact //default is Strong Wildcard
4.) I can successfully ping and tracert to 192.168.0.x from other machines on the LAN
5.) A friend recommended I setup a TCPListener and ensure I could telnet to that to eliminate the firewall as a possibility. If that logic is sound, the firewall isn't the problem
EDIT: Thanks for your help, here's another data point that I believe confirms it's not a firewall issue. I previously posted this connection when behind a rather obtuse (at least to a non Certified guy like me) Juniper Firewall/Router. I have since redone the tutorial on another machine (without IIS) on my home network and still cannot publish the service to other computers within my LAN. Any ideas?
Well it wasn't the hardware firewall, it was the windows firewall! yikes i wasted a bunch of time on that. Once I turned off the windows firewall (the code runs in an intranet anyway) everything worked.
Anyone know of a good site that explains how firewalls and wireshark interact; or i suppose that just has to be one's first test.
I would try a couple things:
First off, get rid of the HostNameComparisonMode line. That might actually disable requests coming from other machines.
If things still don't work, try getting rid of the URL ACLs and run your application as an administrator and see if that works. If that works, you may be able to add the URL ACL back on and not have to run as an administrator. You should only need the one with '+' as the hostname.
I faced the same problem when i tried to self host using OWIN. What worked for me was -
Run Visual Studio as an Admin
Remove any and all netsh urlacl port registrations that I had added while debugging this issue
Add a inbound rule to my windows firewall
I followed the instructions on this link
https://learn.microsoft.com/en-us/dotnet/framework/wcf/samples/firewall-instructions
Check out the section - To enable a port range in advance
That's it! I was able to call my api from other computers on the network.
Hope this helps...

Viewing Mac Localhost on a network PC

I am developing some websites on my Mac (Standard LAMP setup, with PHP5, Using Remy Sharp's LAMP setup instructions). I can see these sites locally by going to (eg http:// apple.dev).
I was just wondering how I view these sites on a connected network PC.
I have tried:
http:// MY-IP-ADDRESS/~MYUSERNAME/apple.dev
But this just returns the file directory structure for the website.
I can see the default webpage by just going to:
http:// MY-IP-ADDRESS/~MYUSERNAME/
Am I doing anything wrong or do I need to do anything else?
I have enabled web sharing
Any thoughts or suggestions appreciated.
It sounds like you have a server alias setup for this site already. In which case the answer is pretty simple. Just edit the hosts file on your pc and enter the ip of your pc together with the server alias in the usual fashion, e.g.
xxx.xxx.xx.xx apple.dev
Where xxx.xxx.xx.xx = your mac's ip address, as found in web sharing.
If this is done, then your pc should find the site when you browse to that alias in its web browser.

Accessing TEAMCITY from a remote machine

I am having trouble browsing to my team city(JetBrains) from a remote machine. I have followed the install directions and the install went smoothly. I can browse the to application locally on the server, no problem at all. I changed the default server url in the config file to be http://my servername . I can browse to http://my server name and the application shows up no problem locally. The application is alos installed on the default 80 port of the server with no other web server installed.
If I browse to http://my servername from my laptop on the same domian nothing happens. When I run diagnostics it seems to pick up the webserve but it fails to respond.
As a test I uninstalled the app and installed IIS to see if I could browse to the default IIS page remotely. This worked no problems at all. I uninstalled IIS, ensured nothing was hogging port 80 on the server. Reinstalled the applicaiton, configured it exactly the same, still nothing. The application works fine locally, but I get nothing remotely.
I was just wondering if anybody knows anything else I can try? or is there a setting in tomcat I need to tweak?
I just updated TeamCity from 7.0 to 7.1, and now I have the exact same issue.
However, what turned out to be the cause had nothing to do w/ the TeamCity upgrade. It turns out our system administrators had setup a policy update to block all incoming connections other than port 80. When I started my upgrade, I noticed the server wanted to do some system updates. So I let that go first.
I suspect that had I tried to access the TeamCity server after the system update, I'd have realized I could no longer access the website remotely.
But since I only noticed it after the TeamCity update, I assumed it to be the culprit and wasted a bunch of time on that red herring.
The solution for me was to
Open Windows Firewall on the server
Click on the root level option in the left-hand pane
Make sure under each of the profile sections, that inbound connections are allowed.
(#3) was my problem.
Hope this helps someone else out in the future...
Verify that the server is running on port which is not blocked by the firewall. Change the port if necessary.
Tomcat also supports binding to specific IP addresses, in case your machine has multiple IPs, you can configure which one to use in server.xml, like:
<Connector port="80" address="10.10.10.10" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Where 10.10.10.10 is the IP of the server which can be accessed from the remote machine.
Check the server logs to ensure that it's started on the correct IP/port and is accepting connections.
I just faced the same issue when evaluating TeamCity v10.0.
I solved it by changing the 'Server URL' value with the name of my computer that can be used from remote computer.
As they say, "make sure the server is accessible by the URL specified".
To reach this setting:
- Login to TeamCity interface then
- Click on the 'Administration' link
This is well explained in the TeamCity support page:
https://confluence.jetbrains.com/display/TCD10/Configuring+Server+URL
The problem is that TeamCity's default server.xml has localhost as the host name. You need to add an alias for it answer that name as well, as described here:
http://tomcat.apache.org/tomcat-4.0-doc/config/host.html#Host%20Name%20Aliases
Ryan

My IP seems to be blocked by web hosting server

I have a strange problem, I just installed my php web site on a shared hosting, all services were working fine. But after configuring my app I just could visit my web site only once, other attempts gives:
"The server is taking too long to respond.".
But from other IP i can access, but only once, it seems all ip addressess beeing blocked after first visit(even ftp and other services get down, no access at all from the IP), can anyone help to explore this problem ? I don't think that it's my app problem, the app works fine on my local PC.
Thanks.
First thing to try would be a traceroute to determine where your traffic is being blocked.
In a windows command prompt:
tracert www.yoursharedhostingserver.com
At the moment, trying to access this address gives this:
Fatal error: Class 'mainController'
not found in
/home/myicms/public_html/core/application/crApplication.class.php
on line 181
I have tried it multiple times and it didn't block me. It might be that You have already solved this problem.
As far as I know, the behavior described by You could only be explained by a badly configured intelligent firewall. It may have been misconfigured by Your host.
If You visit a site at a certain host and suddenly You cannot access an ftp on this host, then it's either a (really bad) firewall or a (very mean) site that explicitly adds a firewall rule to ignore that address.
Some things that You might look into:
It might be something with identd too. What was the service You have configured on Your host? Was it by any chance any kind of server-controll panel (that might have an ability to controll a firewall)?
Is the blockade permanent, or does it go off after 24h, or does it only go off after rebooting the server? Does restarting some services makes the blockade go off?
Did You install any software that "protects Your server from portscanning"? It might be a bit too aggressive.
I wish You good luck in finding a source of this problem!
Chances are that if you can access it once that its actually working. The problem is more than likely in the php code than in the server.

Resources