Changes between Version 181 and Version 182 of doc/meek


Ignore:
Timestamp:
Jul 22, 2015, 4:59:33 AM (4 years ago)
Author:
dcf
Comment:

Remove mention of setting up WSGI reflector on Azure. The Azure CDN allows arbitrary origin URLs now, so the reflector is no longer necessary.

Legend:

Unmodified
Added
Removed
Modified
  • doc/meek

    v181 v182  
    164164
    165165{{{
    166 $ wget -q -O - https://ajax.aspnetcdn.com/ --header 'Host: az668014.vo.msecnd.net'
     166$ wget -q -O - https://ajax.aspnetcdn.com/ --header 'Host: az786092.vo.msecnd.net'
    167167I’m just a happy little web server.
    168168}}}
     
    187187 * http://azure.microsoft.com/en-us/pricing/free-trial/
    188188
    189 Here's how to set up Azure. Azure's CDN is not a general-purpose CDN: it can only point to domains running on Azure. Just as with App Engine, we need to run a tiny "reflector" app on the platform itself, one that simply copies requests and forwards them to an external meek-server. Azure has three main kinds of service: [http://azure.microsoft.com/en-us/documentation/articles/choose-web-site-cloud-service-vm/ Azure Websites, Cloud Services, and Virtual Machines]. Probably any one of the three works fine as a reflector. With a VM you could also just run the bridge directly on Azure. These instructions are for setting up an Azure Website, which gives you a subdomain of azurewebsites.net.
    190 
    191  * [https://azure.microsoft.com/en-us/documentation/articles/web-sites-python-configure/ Configuring Python with Azure Websites]
    192  * [https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/ Publishing to Azure Websites with Git]
    193  * [http://msdn.microsoft.com/en-us/library/azure/gg680301.aspx How to Enable the Content Delivery Network (CDN) for Azure]
    194 
    195 Log in at https://manage.windowsazure.com/. Click New→Compute→Web App→Quick Create, then enter a name and choose a region. Click "Create web app". Click the site name to get to the Quick Start screen. Click "Set up deployment from source control". Choose the Local Git option and set your user name and password. Note the push URL. Click the Configure tab. Turn off PHP and turn on Python 2.7. Under "app settings", set
    196  * PYTHONPATH=D:\home\site\wwwroot\reflect
    197  * WSGI_HANDLER=reflect.main
    198 Under "handler mappings", make the first line be
    199 {{{
    200 *       D:\python27\python.exe  D:\python27\scripts\wfastcgi.py
    201 }}}
    202 Under "virtual applications and directories", replace the first line so that it is
    203 {{{
    204 /       site\wwwroot\reflect    Application ✓
    205 }}}
    206 Finally, click the Save button at the bottom.
    207 
    208 [[Image(azure-setup.png)]]
    209 
    210 Now set up your local Git repository and push to the deployment.
    211 {{{
    212 mkdir azure
    213 cd azure
    214 git init
    215 mkdir reflect
    216 cp ~/meek/wsgi/reflect.py reflect
    217 git add reflect
    218 git commit -m initial
    219 git remote add azure https://<username>@<appname>.scm.azurewebsites.net:443/<appname>.git
    220 git push azure master
    221 }}}
    222 
    223 Now the code is running and you can use the URL !https://''appname''.azurewebsites.net/ in your meek configuration. In order to protect the domain, you have to set up the CDN. From the main screen, click New→App Services→CDN→Quick Create and select the Azure Websites domain you created. Once the CDN endpoint is created, click on it and click "Enable HTTPS" at the bottom. It really does take about an hour before it starts working. Now you have an az''######''.vo.msecnd.net domain name that points to your ''appname''.azurewebsites.net domain, and you can front the former with any other Azure CDN domain such as ajax.aspnetcdn.com.
    224 
    225 Adding your own CDN endpoint appears to be necessary; i.e., you can't front your azurewebsites.net domain but you can front your CDN domain. I also couldn't get it to work with reflect.py installed directly in the D:\home\site\wwwroot domain; I had to put it in a subdirectory and edit "virtual applications and directories" to match.
     189Here's how to set up Azure.
     190Log in at https://manage.windowsazure.com/.
     191From the main screen, click New→App Services→CDN→Quick Create.
     192Under "Origin Type" select "Custom Origin"
     193and then enter the URL to the meek-server host in the "Origin URL" box.
     194Click "Create".
     195Once the CDN endpoint is created, click on it and click "Enable HTTPS" at the bottom.
     196It really does take about an hour before it starts working.
     197Now you have an az''######''.vo.msecnd.net domain name that points to meek-server
     198and you can front to it with any other Azure CDN domain such as ajax.aspnetcdn.com.
    226199
    227200