This repository has been archived by the owner on Jun 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README_APACHE
45 lines (30 loc) · 2.1 KB
/
README_APACHE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
For this example, the base directory for mysite.com web is
/var/www/www.mysite.com/htdocs
1) Make a directory in your web path that will be the chxdoc directory for the project, for example htdocs/api
2) Install the chxdoc.n file (not the executable version) to htdocs/api/index.n. Remember to rename it, since
Apache is configured to look for an index.n file.
3) Make the templo temporary directory, which should be outside the viewable web, ie. /var/www/www.mysite.com/__chxdoctmp
4) Install the xml files for the platforms in another directory above the htdocs, ie. /var/www/www.mysite.com/platforms. Copy
all the .xml files generated by haxe here.
5) Install a .htaccess file in htdocs/api/. It should look something like this, but check the 'htaccess' file for updates
<IfModule mod_rewrite.c>
Options -Indexes
RewriteEngine on
RewriteRule ^chxdoc\.js$ - [S=6]
RewriteRule ^index\.n$ - [S=5]
RewriteRule ^stylesheet.css$ - [S=4]
RewriteRule ^images/.*$ - [S=3]
RewriteRule ^(types)/(.+)$ index.n?base=$1&path=$2 [NS,L]
RewriteRule ^(packages)/(.+)$ index.n?base=$1&path=$2 [NS,L]
RewriteRule ^([^/]+)$ index.n?base=$1&path= [NS,L]
</IfModule>
6) ChxDoc will not install the template when generating a web config. Copy template the full templates directory from ChxDoc to
/var/www/www.mysite.com/
7) Since the stylesheet.css and the images directory will not be automatically installed, copy these into htdocs/api/
8) Build your docs... from /var/www/www.mysite.com/ do
cd htdocs/api && neko index.n -o api --tmpDir=../../__chxdoctmp --templateDir=../../templates/default --developer=false ../../platforms/flash9.xml,flash9,flash ../../platforms/neko.xml,neko ../../platforms/js.xml,js --writeWebConfig --webPassword=password
Be sure to replace the password with something better. If you forget the password, re-running this command from a shell will
overwrite the config
9) Check http://www.mysite.com/api
10) See the current configuration at http://www.mysite.com/api?showconfig=true&password=password
11) Regenerate docs when xml files change with http://www.mysite.com/api?reload=true&password=password