https://help.apple.com/serverapp/mac/getstarted/4.0/#/apd9a7f7c98f
Lesson 1: Create a private, local, dynamic website
Lesson 1: Create a private, local, dynamic website
In this lesson, you’ll learn:
How to create a private website on your local network that uses a web app to produce webpages
How to enable and select Python web apps
- How to create a private website on your local network that uses a web app to produce webpages
- How to enable and select Python web apps
- How to use a built-in Python web app as a default webpage
How to use a built-in Python web app as a default webpageStep 1. Select Websites
- Step 1Open the Server app to see the list of services available in OS X Server. Select Websites.
Step 2. Enable Python web apps
- Step 2. EnableSelect “Enable Python web appsapplications.”
Step 3. Add a website
- Step 3.Click the Add a websitebutton .
Enter the following information in the website creation pane:
- Step 4Enter the server’s local host name—for example, “myserver. Enablelocal.”
This is the name that Safari users on your local network use to view the website.
- Select the sample Python web app to generateserver’s local network IP address from the webpagespop-up menu.
- Leave the SSL certificate as “None.”
Don’t click Create yet.
Step 4. Enable the sample Python web app to generate the webpages
- Click Edit Advanced Settings, then select “Python ‘Hello World’ app at /wsgi.” Then click OK.
Note: Once you get this working, you could add your own web apps written in Python.
Step 5. Make the Python page the default index page
- Step 5. Make the Python page the default index page - ReturnReturn to the website creation pane, and click Edit next to Index Files. Add an index index called “/wsgi” and drag it to the top of the list, then click OK OK.
Step 6. Create the site
- Step 6. Create the site - After the configuration is finished, click Create to make the new site.
Step 7. Test your configuration
- Step 7. Test your configuration - Open Safari and go to the site URL (myserver.local, in this lesson) to see the generated page.