Reputation: 466
I have a virtual directory that points to a virtual drive on sql server. I need this directory to be accessible over the Internet, how do I do that? I've tried adding a virtual directory to default IIS website
When navigating over to localhost/magentofiles this is what I get.
Of course it cannot find web.config...it's a directory not a project I'm trying to publish. Any help is much appreciated.
Upvotes: 0
Views: 614
Reputation: 466
Since it didn't really matter whether to use IIS or XAMPP, I went with XAMPP because I could not solve the errors of IIS. Now here's how to publish a directory over xampp.
open up xampp\apache\conf\extra\httpd-vhosts.conf and at the bottom of the file append this code
<VirtualHost *:80>
DocumentRoot "C:\xampp\htdocs\files"
<Directory "C:\xampp\htdocs\files">
Options FollowSymLinks Includes ExecCGI
Require all granted
</Directory>
</VirtualHost>
You should be able to access files in that directory over localhost/images/example.png
Also note that the user, which xampp runs by should have access to the destination that you are publishing, otherwise you will get 403 Access forbidden.
Upvotes: 1
Reputation: 5215
There are many reasons for this error, you can try the following methods to solve the problem:
Right-click the website in your iis, then select Explore, check the current project folder if there is a web.config file, if there is then right click your web.config, expand properties, and under security tab, add IIS_IUSRS. Give the group read/write permissions.
Right-click the application pool of your current project, select Advanced Settings, and then change the Identity to LocalSystem.
Adding the IIS_IUSRS with read/write permissions to C:\inetpub\wwwroot.
Upvotes: 0