MAMP Pro changing Server Name results in Access Denied error - dns

All,
I have MAMP Pro 3.4. I have a virtual host 'mysite.local' running on the standard MAMP port 8888. I'm running Apache/MySQL server as my user (not WWW). Everything works.
But when I change the host name in MAMP to anything else (like 'localmysite', restart the servers and reload the site in Chrome, I get:
"Access Denied (policy_denied) Your system policy has denied access to the requested URL."
When I view the Hosts file from MAMP, it looks like MAMP correctly updated the host file:
127.0.0.1 localmysite # MAMP PRO - Do NOT remove this entry!
::1 localmysite # MAMP PRO - Do NOT remove this entry!
But it simply doesn't work. When I change the host name back to 'mysite.local' and restart the servers, it works again. What is wrong and how do I fix it so I can change the host name?
Thanks.

OK, after a lot of trial and error I figured out what was going on. It was a proxy server problem. My machine is connected to a corporate proxy server, and that server was attempting to interpret "localmysite" and failing to allow it.
In Chrome, I simply had to go to:
Settings->Advanced->Change proxy settings->Bypass proxy settings for these Hosts & Domains.
Then add "localmysite" to the list of sites that will bypass the proxy server.

Related

How do I set up my Linux Azure VM so that I can connect via a browser?

I'm working on a Linux VM on Azure which was set up by someone else (so I don't know all the details). I'm trying to connect it to a domain name.
The server has a "Hello World" program, so when I go to "example.com" I should be seeing "Hello World". Currently I'm just getting
Safari can't open the page "http://example.com" because Safari can't find the server "my domain.com"
I thought I'd start with making sure that the IP address connects to the server (which it did at one point. So I enter the IP address of the server (let's say it's "12.345.678.901") in the browser, and it can't connect... I get the error
Can't open the page "12.345.678.901" because the server where this page is located isn't responding
There's an Inbound port rule to allow connections for port 8080, so I tried "12.345.678.901:8080" but this time got
Can't open the page "12.345.678.901:8080" because Safari can't connect to the server
I don't know what to try next. Presumably something needs to be enabled on the server to allow the browser to connect?
The other inbound port rules are ssh on port 22 (TCP) and then what I assume are the standard Azure ones (I can't edit or delete them anyway).
To view your Linux VM inside the browser, you need to install a web server. Easiest to install and get working straight away is nginx.
First thing you need to do is SSH(port 22) into your VM using the username and IP address of the machine:
ssh username#ipaddress
Which will prompt you to enter a passphrase to gain access to the VM.
This also assumes your SSH public key exists inside ~/.ssh/authorized_keys on the VM. If you don't have this setup then you need to get the owner of the VM to copy your public key into this file. Otherwise you won't be able to connect and get a Permission denied (publickey) error.
Assuming the above works, you can install the nginx webserver with the following two commands:
sudo apt-get -y update
sudo apt-get -y install nginx
Then once this web server is installed, add an HTTP inbound port 80 rule inside the network settings. For security reasons, having your web server listen on this port is probably unsecure long term. Its just easier to get working when you choose this port to begin with, because its the default.
You can see what the default listening port by viewing the server configuration host file with cat /etc/nginx/sites-available/default:
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
Which shows the default port of 80. You can change this default port to 8080, then run sudo service nginx restart to restart the server and apply the changes. Additionally, you can have a look at this How to make Nginx Server Listen on Multiple Ports tutorial, which goes into more depth on how to configure listening ports for nginx webservers.
You should then be able to view your VM from a browser window(blurred out my IP address for security reasons):
You can also have a look at this Quickstart: Create a Linux virtual machine in the Azure portal tutorial for a step by step on how to get this setup in Azure.
You should first check to see if you have an entry for http://example.com. The reason could be that you do not have a DNS Entry and when you are trying to connect to it via the browser. Since you tried connecting to it via IP and it still did not work, I would suggest you check your Webserver configurations to make sure it is correctly listening for port 8080. Also, ensure that your webserver is also turned on as well. You can tail the webserver log and try to hit it via the IP like you did earlier and see if you see any errors in the logs. It would at least tell you if your request you are making on your browser is actually getting to the webserver.

Teamcity server url returns 404

I installed TeamCity on a windows server 2016 machine and I assigned the ci.mydomain.com to the serverUrl. I have IIS also on that machine that hosts my nuget server.
When I type in ci.mydomain.com it returns a 404. nuget.mydomain.com works fine
Does anyone knows why?
Thanks in advance
"Server URL" in TeamCity administration settings does not affect how TeamCity server can be accessed.
You can start by opening 127.0.0.1:PORT on the server machine to check that the TeamCity is running OK, where PORT is where TeamCity is configured to run on (e.g. check \logs\teamcity-server.log file, line with "Web server ports")
If that works, make sure SERVER:PORT works from other machines, where SERVER is the machine IP and the same PORT. If you'd rather use IIS as a reverse proxy, check related TeamCity instructions.
Finally, you will need to make sure ci.mydomain.com resolves to the IP and use due port in the URL.

Accessing remote linux server's localhost:8080 from windows desktop

I am a complete beginner with Linux. I have ssh access (I think that's what it is) to a linux server. I have a program called SpagoBI installed on the server, and it needs to be accessed through localhost:8080 in a browser. I have changed the xml file that points to localhost to the ip of the server but I still can't access it. Does anyone have any suggestions on how to access the localhost through the ip?
With SpagoBI configured to answer on localhost (the default), you can use Putty on Windows create an SSH tunnel from your local system to the SpagoBI system. If you were to redirect local 8080 (of your local system) to 8080 of the SpagoBI system, then you could access the remote SpagoBI server like this http://localhost:8080/SpagoBI while the SSH tunnel is up.
Now... to configure the SpagoBI server correctly so that it answers on a specific FQDNS... you'll need to modify the Tomcat server.xml
Go to the Tomcat config directory and edit server.xml. These are two entries you'll need to modify. Then restart tomcat and try to access SpagoBI using the FQDNS and URL.
<Environment name="spagobi_service_url" type="java.lang.String" value="http://spagobi.example.com:8080/SpagoBI"/>
<Environment name="spagobi_host_url" type="java.lang.String" value="http://spagobi.example.com:8080"/>
After restart, try accessing SpagoBI like http://spagobi.example.com:8080/SpagoBI
I hope I understood. Do you write "localhost:8080" on your remote windows machine? If so, you should write the SpagoBI's address instead of localhost.
If you already doing so, I see on SpagoBI troubleshooting that you should try with http://serverIP:8080/SpagoBI/servlet/AdapterHTTP?PAGE=LoginPage&NEW_SESSION=TRUE.
I would check that 8080 port is open on firewall anyway.
If you have access to the GUI on server I would try to open in a browser that http://localhost:8080 is actually working at least locally.
Check whether the spagoBI is working in linux server or not. If not follow these steps: http://www.2daygeek.com/spagobi-5-0-release-notes-installation-steps/
If it's working in linux server, it can be opened in you windows system with the url:http://ipaddress of linux server:portnumber/SpagoBI.

Asking for the user name and password for the localhost in firefox, after installing WAMP

I have already running IIS in my windows XP. I have also install wamp server.
**The wamp server is showing the inactive icon.
When I was installing the WAMP, I was asked to set the firefox as my default browers for WAMP. Now when I am going to start use any service of it (i.e. localhost or phpmyadmin), firefox is asking me for the username & password for the same (the dialog box saying that "Enter username and password for http: //localhost")
What should I do ?
Thanks
You have to turn of IIS by putting inetmgr in run, then you will get window for IIS by that you can turn off IIS.
Because IIS is run on port 80 and apache of WAMP is also trying to run on port 80,but that was acquired by IIS so you have to stop IIS.
And regarding firefox it is upto you ,that you have to put it default or not.

Assigning a domain name to localhost for development environment

I am building a website and would not like to reconfigure the website from pointing to http://127.0.0.1 to http://www.example.com. Furthermore, the certificate that I am using is of course made with the proper domain name of www.example.com but my test environment makes calls to 127.0.0.1 which makes the security not work properly.
What I currently want to do is configure my development environment to assign the domain name www.example.com to 127.0.0.1 so that all http://www.example.com/xyz is routed to http://127.0.0.1:8000/xyz and https://www.example.com/xyz is routed to https://127.0.0.1:8080/xyz.
I am not using Apache. I am currently using node.js as my web server and my development environment is in Mac OS X Lion.
If you edit your etc/hosts file you can assign an arbitrary host name to be set to 127.0.0.1.
Open up /etc/hosts in your favorite text editor and add this line:
127.0.0.1 www.example.com
Unsure of how to avoid specifying the port in the HTTP requests you make to example.com, but if you must avoid specifying that at the request level, you could run nodejs as root to make it listen on port 80.
Edit: After editing /etc/hosts, you may already have the DNS request for that domain cached. You can clear the cached entry by running this on the command line.
dscacheutil -flushcache

Resources