i have installed WAMP server on a windows computer and set up a mysql database and php enabled web application. The server is running windows XP.
Now I want to access the index.php file through my Mac connected to the same network. When I browse to the folder and click on the file, it downloads and opens it on the editor instead of the browser. Even when I right click on the file and select open with other, all the browsers are greyed out and not selectable.
I would really appreciate if someone can help me out with this.
You are trying to access the HTML file in the File Explorer.
Web pages served by web servers are supposed to accessed through the browser (like Safari, Chrome, Firefox and Internet Explorer).
So, if the name of the server machine (the one running windows XP, in your case) is, say, windowshost, then go into the browser and type:
http://windowshost
Or, maybe, since it is wamp:
http://windowshost:8080
That last part (:8080) is the port where the web server is. It really depends on how it is configured.
make sure that Windows Firewall is not blocking port 80
and then from the browser in Mac type : http://[windows-ip-address]/index.php
This is a confusion arising from the fact that the index.php file exists in two locations: the 'virtual location` that is provided by the web server, and the actual location on your computer's storage device (whether this is a local or remote storage device).
When accessed through the server, the PHP is rendered into HTML, so your browser can understand it, and the content-type is explicitly set to HTML.
When you attempt to open the php file from your file browser, it just looks like a .php file :) So, quite understandably, it opens in your text editor.
In order to see the rendered index.php, you must, in your web browser, go to your Windows' computer's hostname/ip address.
if you want to access through it mac, then first ensure that whether it is accessible on windows if yes, then in that link put your ip address in space of localhost then it will be accessible on mac.If it is still not accessible then put you ip address in mac host file then it will be accessible.
Related
I set up a server on Ubuntu 20.04, installed and configured UFW and fail2ban, installed nginx, opened 80 and 443 ports. Created a config file for my domain and started the server. It works, but from my IP address (from which I set up the server), I cannot get to the site. When I request a domain, I get a white page on which my domain is written in plain text. But as soon as I register the domain and IP in the hosts file, the site becomes available. I see the problem only from my IP, from others - the site is available. I can provide server settings, but they are corny simple. The site is still pure HTML. Even php didn't install.
Help me find the problem, or at least a direction to fix it.
Thanks!
It might be related to cached DNS queries. Remove the entry from /etc/hosts file and restart your local machine.
I want to show my client the WordPress website on localhost being developed by me (it's still in the beginning stage, not ready to go live yet). This is what I have done so far:
- I have done port forwarding and have tested it (whenever I access my Xampp localhost from the remote network by entering my computer's ip, it opens up the localhost dashboard).
Now this where I'm stuck:
- Whenever, I specify a directory of website (in htdocs) on my remote network's url (like this: mycomputer's ip/folder's name it changes the url to localhost/folder's name and the page doesn't open).
How do I resolve this issue?
Add this line to your wp-config.php might help:
define('WP_HOME','http://your-computer-IP');
define('WP_SITEURL','http://your-computer-IP');
and comment or delete that line when your work from home.
But there's something can be improved. Try to some DDNS services and install their application to your local machine. After installed, you can access your computer from mymachine.ddns.net even you're home or not. So with below setting, you no need to edit anything when you change your work location.
define('WP_HOME','http://mymachine.ddns.net');
define('WP_SITEURL','http://mymachine.ddns.net');
I am adding a web application to my local iis. I added the path to the folder with the bin is inside. I specified the application pool and applied my login credentials. When I hit test settings, everything passed. When I typed mysite.local on the browser, I get the following. I also clicked on Browse Website and get the same error. This is on my personal PC.
Server not found
Firefox can't find the server at www.comicrage.local.
Check the address for typing errors such as ww.example.com instead of www.example.com
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
Have you added mysite.local to the hosts file? If not, add the following to C:\Windows\System32\Drivers\etc\hosts.
127.0.0.1 mysite.local
The hosts file is responsible for any local overrides that should take precedence over DNS.
Just to begin I am a beginner in ASP, and havign some difficulty in deploying my first application.
I made a asp.net project in VS2008, and I ws trying to deploy it on another machine and following are the steps that I did:
right clicked on website and published set loaction to c:\inetpub\wwwroot and pasted my app to this folder.
Then I went to control Panel- admin tool- IIS and there it showed the website which I copied then went to its properties added documents, set ASP>NET version, it was blank by default. Then edited the configuration and under authentication changed its mode to none.
And then when I cick on the app in IIS and browse it showed the desired output, but I need to know how to open the same app in browser.
Thanks
If I've understood this correctly - it does depend on how the website has been set up in IIS. At it's most simple it would be
As the default website
http://[external IP of webserver]/default.aspx
As a virtual under the website
http://[external IP of webserver]/[virtualName]/default.aspx
Assuming there is a file called default.aspx (insert your own)
if default.aspx is specified as a default document for the site
http://[external IP of webserver]
http://[external IP of webserver]/[virtualName]
if you are using binding to a specific IP and or port (look in IIS, left handside at the binding link - see image below)
http://hostname: optionalpost
Apologies if I have misunderstood
EDIT
To check whether the site is active at all and to get a better idea of what the external URL is then on the left hand side of IIS will be browse to website. Click this to check whether the site comes up at all.
If it does then the URL should be obvious. It could be one with a host header i.e. looks like a normal URL i.e.
http://mytestsite.com
If it is in this format then you may not be able to browse externally if you can't resolve this hostheader to the IP of the box. To get around this then edit you host file and add a mapping from the url to the external IP of the box.
Host header is at following in windows 7 (or windows generally i think)
C:\Windows\System32\drivers\etc\hosts
Please back this file up before editing it
I have an application that displays PDF files via Crystal Reports in a new window to the user. This works perfectly on my development machine and when accessing the site directly on the production server (remote desktop running browser installed on server) but when i access the site from the out side over the internet i get the error. Other reports display fine and this report used to work until i recently made some changes and re-installed the site. All code is in try ... catch but not info is being written to my error files. Cant figure out why it would work locally on the server but not over the internet and only this one report.
Have tried the System.Web attributes maxRequestLength and executionTimeout.
The Server is:
Windows Web Server 2008
IIS 7
Framework 4
This turned out to be an issue with the crystal report file, i never found out exactly why but i narrowed it down to one of the fields causing the problem, remove the field and no problem. I think it may have been linked to the reports xml based data source but cannot prove it.
Probably a firewall setting. Please make sure your firewall explicitly allows incoming connections to the TCP port 80 (or 443 for https, or anything else if you are accessing the site via another port) and try again.