I would like to create a simple static web site on Azure Web Apps. I don't want any VS or PowerShell so I have just connected my Azure Web App to my OneDrive account. I just want to edit my local files and see them on site.
I have created new web app, connected it to my OneDrive account and this step was fine, it created apps/Azure Web Apps/""app name"" folder in my OneDrive so I have placed some html/css files there. Web App was synchronized; however, I could not open any html file (404 could not get resource index.html).
I FTP-ed site and I have found that there is a following element in my Web.Config file:
<rule name="StaticContent">
<action url="public{REQUEST_URI}" type="Rewrite"/>
</rule>
Ok, so by default it assumes that static content will be in "public" folder so I have created "public" folder in my OneDrive and moved html file there. I have opened html file on my site url via browser and it was shown successfully!!!
Now, I have copied some other html/css files in subfolders of my "public" folder, but I cannot open them. Http requests to ""site""/somefolder/file.html ""site""/somefolder/file.css returns 404.
It seems that StaticContent rule do not matches subfolders.
I can continue hacking this and modifying iisnode rewrite rules, but am I missing something?
I just want simple static site connected to my OneDrive or Dropbox account, no VS, no power shell, no customization. Is it possible that this is a minefield if you are using the simple use case? Is there some tutorial or setting that I have not found?
It's actually a lot simpler than what you tried.
As CSharpRocks already suggested in a comment, you could place static HTML files and resource files into the root folder. However, you did say that you want to use your OneDrive account.
The trick is to identify the source location on your OneDrive account, after you set it up on Azure. It looks like you already tried that initially, but it appears that you also moved the files to a different "public" location.
Just to clarify, here are the steps that I performed.
Since you already have continuous deployment set up (from Step 1), your website should be updated automatically every time that OneDrive folder (from Step 2) is updated. Make sure you choose to replace files when uploading any newer versions of files that already exist.
But you also mentioned that you have a Web.config file. Since you only have static files, you don't need this configuration file. Delete the Web.config file in Azure. You could use FTP to access your "/site/wwwroot" folder to delete the file. Make sure that you don't include the config file in OneDrive.
Hope that helps! :-)
Screenshots of my Azure portal and OneDrive below: