If I type localost in IE, it yields "It works!" but I can't seem to locate where exactly that page is picked from.
In c:\InetPub\wwwroot\ nothing exists that points "It works!" page.
I created a test folder inside wwwroot above. I put an aspx file there, it does not work (no file found), then i created a test.htm file, that can not be accessed through localhost/test/test.htm
Anyone knows what is wrong. I never ran IIS on this particular system. I have Windows XP Pro, and IIS6 is installed.
Please help.
I think it will answer it myself. There were two confusion first of all, IIS 5.1 was installed along with IIS 6 (there was a link in Administrative tools) and Apache server as well. Something was probably messing with it before I came. I uninstalled Apache, IIS 6 link (was not supposed to be there in the first place), and even IIS. Fresh installed fixed everything.
Also if you are running into problem like this, get familiar with IIS, how it works. It runs out of Virtual folders and you have to turn these virtual folders into Applications. It is tricky the way Microsoft do it.
In my case probably both the server were using the default port 80 (I am not sure though). I now have both servers intalled (IIS + Apache), with Apache using port 8080.
To test situation like this, do this: create a virtual folder in IIS 5.1, right click on it and turn that folder into application. Put an aspx file in the "actual" location that this virtual folder points to see and then open it in browser using localhost\virtualfolder\myaspx.file. Note that in many case IIS will not pick the default.aspx file automaticaly unless explicity given.
Related
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.
I have deployed an ASP.NET MVC 4 application to a new site I have created in IIS 7.5, which I have bound to port 8080. I can reach it by navigating to http://localhost:8080, but I want to reach it via http://localhost/MyWebsite.
I have added a Virtual Directory under my website, which points to "C:\inetput\wwwroot\MyWebsite\". However, when I navigate to http://localhost/MyWebsite, I am presented with a configuration error:
"It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level. This
error can be caused by a virtual directory not being configured as an
application in IIS."
Here is what my IIS hierarchy looks like (this is a demo since I have no internet access on the server I am working on).
I have two questions:
Why am I getting this error?
Is this the best way to go about achieving what I want? It seems messy to have the list of files and folders underneath the website and then again underneath the Virtual Directory. If there is better practice then please tell!
Virtual Directories cannot execute scripts, reason why you are getting that error. You need to make your MyWebsite folder an Application. Also, you don't necessarily have to create a separate website for your website, you can use the Default Web Site and create an application MyWebsite in there (it might be less confusing maybe?).
I have a site I developed locally for a client. They have an existing live site (at www.livesite.com). I want to move the developed site to their server, but I want to test it on their server before it's live.
I thought I'd install the site in a sub directory on their server (www.livesite.com/dev), and then using my hosts file, make my browser think it's viewing the final live URL (www.livesite.com).
However, I've tried various combination of things in my hosts file, and I can't seem to get it to work. The server ip followed by the domain / sub-domain.
I'm running on MAMP on OSX. Anyone have experience with this?
I want to test some code on localhost before uploading to a live site. So I decided to install Apache. I'm running 64bit windows 7 enterprise edition. I downloaded httpd-2.0.64-win32-x86-no_ssl.msi. I installed it under C:\Program Files (x86)\Apache Group\Apache2
I have set domain name and server name to localhost in my installation, and used default value for all other steps. In my configuration file httpd.conf, I have ServerName localhost:80.
I followed everything I can find on online apache installation tutorials. But when I typed in localhost in my browser, I got a 404 error :(
I know it's very hard to diagnose this way, but I just wonder if someone can spot an important step I'm missing.
I'm feeling it could be something to do with my 64bit machine, and the long folder name Program Files (x86). But I have tried to install on C:\Apache directly and failed too (even got an error during installation). Can someone help?
Finally figured it out. Apache service didn't start because another system process was listening to port 80. Refer to these two posts for solutions:
http://forums.zpanelcp.com/archive/index.php/t-5265.html
http://www.softaculous.com/board/index.php?tid=1575&title=Apache_won%27t_start
Good luck to all!
Did you start the service?
Also, you should install XAMPP or WAMPP, which offers Apache, PHP and MySQL support without all the configuration hassle.
If you got a 404 error then either the webserver is running or you failed to start it and have something very wrong with the existing network config on your machine.
The latter is a lot more likely - and you can check this by looking at the logs which it has generated - there should be entries in both the access and error log.
If the problem is the spaces in the path (you'll see an error relating to the documentroot from the entries added to the error_log at startup) then (IIRC) you can either enclose the path in double quotes or use a path for the document root which doesn't have spaces - the content doesn't have to site below the directory you installed Apache into - indeed it's arguable that using a different path is good practice. Note that several versions of mod_fcgid don't like paths with spaces even if you quote them.
I have a site I developed on a WAMP server in house, and is hosted offsite (presumably on an Apache server). The site was created in the root directory of the WAMP server (C:\wamp\www). I'm now trying to move the in house development site onto a Windows Home Server v1 box (essentially a Server 2003 machine running IIS 6). I'm trying to not have two different versions of the site: one for in house (on IIS), and one for hosting offsite (on Apache).
On the WHS machine, I have a virtual directory <sitename> located at:
c:/inetpub/<sitename>
I can access it on the server at:
Localhost/<sitename>
and from anywhere on the LAN at:
<ServerName>/<sitename>
When I initially wrote the site, I used the ../ declaration for almost every file,
path, directory, and PHP include files. This works fine on the WAMP server and on the
offsite host. But, when I moved the site into the virtual directory <sitename>, it
fails on the IIS server.
All such ../ references point to the server root:
<ServerName>/
rather than site home:
<ServerName>/<sitename>
Presumably, I could move the site into the 'root' directory: c:/inetpub/wwwroot, but
Windows Home Server uses this for something else.
I could change every reference from ../ to ../<sitename>/, but that would mean having 2
different sites to maintain, one for in house and one for offsite.
So, my questions are ...
Is there any way to declare that the virtual directory c:/inetpub/<sitename>
is the home or root directory for this single site? Is there a configuration
in IIS that will do this for this one virtual directory, and not upset the other
sites hosted on this server?
If not;
Can someone point me to some other way to rewrite the site in order
to have it run on both Apache and IIS 6 with no/minimal
alterations for the two different servers?
I have been searching for over a week on this. All of the solutions that I have found are specific to either Apache or IIS, but won't work in both.
Thanks!
Ok, here's a -possible- answer ...
I changed every ../ to a PHP include statement, calling a file I named SiteBase.txt.
On the IIS server, SiteBase.txt consists of a single line: http://<ServerName>/<sitename>/.
On the WAMP server, SiteBase.txt consists of a single line: ../
This way, I only have to change this one file when I move the site from my development server to the production server. A bit Brute-Force, but it seems to be working.
Does anyone see a problem with this?
Thanks!