summaryrefslogtreecommitdiff
path: root/webserver/README-webserver.md
blob: 36f07336f36259b583a8c3dcf48c226fb68f6070 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# GNU Savannah Git-WWW project - WebServer Configuration

The Web-Server is the public facing 'http://gnu.org' and 'http://nongnu.org'.

To minimize the amount of work required from FSF sys-admins,
most of the existing configuration stays the same:
   /etc/apache2/sites-enabled/*.conf
   /etc/apache2/symlinks
   /home/wwwcvs/update-*  scripts (to update/generate symlinks)
   /var/www/
   /var/www/savannah-checkouts/gnu  -  projects under gnu.org/software/XXX
   /var/www/savannah-checkouts/non-gnu - projects under nongnu.org/XXX
   /var/www/savannah-checkouts/translations - translation web files.

The files in `./webserver/wwwcvs-orig-files` are the configuration files
that are currently being used for gnu.org (to the best of my knowledge),
see: <https://savannah.gnu.org/task/?13200> .

The files in `./webserver/home-wwwcvs` are the same original update scripts
with very minor changes (e.g. adding '-L' to the `find` command).

The files in `./webserver/apache-conf` are the same original apache configuration
files, with minor changes (e.g. working on 'gnu.housegordon.org' instead of 'gnu.org').

TODO:
One major difference is the mechanism to notify the webserver about new projects.
The current server uses a 'new.py' hack.
In the new setup there's no established method yet,
but since the wwwgit server has a page with recently updated projects,
The update scripts on this server can simply create new project when they see one.


## Manual configuration

    # Create wwwcvs user
    sudo adduser wwwcvs
    # TODO: make it member of www-data group ?

    # Apache configuration
    sudo a2enmod vhost_alias
    sudo cp ./apache-conf/* /etc/apache2/sites-available/
    sudo a2ensite 010-www.gnu.org
    sudo a2ensite 025-www.nongnu.org
    sudo a2ensite 030-star.nongnu.org

    # Copy and setup symlink-update scripts
    sudo mkdir /etc/apache2/symlinks
    sudo chown wwwcvs:wwwcvs /etc/apache2/symlinks
    sudo cp ./home-wwwcvs/update-* /home/wwwcvs
    sudo chown wwwcvs:wwwcvs /home/wwwcvs/update-*

    # create important directories
    # TODO: which user should own these? wwwcvs probably...
    sudo mkdir /var/lib/savannah-checkouts/

    # Create a project list file on 'internal.sv.gnu.org',
    # Using `create-projects-list.sh` script (see `savannah` directory).
    # Copy the file to this server.
    # TODO: where to store it? perhaps /home/wwwcvs ?

    # TODO: copy these update scripts to /home/wwwcvs ?
    # Fetch all projects for the first time.
    # NOTE: this will take some time...
    ./update-scripts/create-gnu-sv-www-repo.sh


    # Test project updates:

    # Update all repositories:
    update-all-gnu-sv-www-repo.sh

    # Or update only recently changed repositories:
    update-recent-gnu-sv-www-repo.sh


## Scripts to update the server after every update

    # Update the symlinks maps in
    #    /etc/apache2/symlinks
    # based on the ".symlinks" file in each repository.
    sudo -u wwwcvs /home/wwwcvs/update-symlinks.sh

    # Update the English language symlinks,
    # See more information in ./multiviews.txt.
    # NOTE: This is not part of the production server setup at www.gnu.org.
    ./create-lang-en-symlinks.sh