KDE.org/Staging Setup: Difference between revisions

From KDE Community Wiki
m (formatting)
 
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:
==Getting the needed module from SVN or git==
==Getting the needed module from SVN or git==


You need to checkout the appropriate www module from our SVN, it's located in /trunk/www, most of the sites using Capacity are in /trunk/www/sites. Some sites have migrated to git as shown [http://projects.kde.org/projects/websites here]
You need to checkout the appropriate www module from our SVN, it's located in /trunk/www, most of the sites using Capacity are in /trunk/www/sites. Some sites have [https://cgit.kde.org/websites/ migrated to git];
The www module will be the documentroot of your apache, therefor keep
The www module will be the documentroot of your apache, therefor keep
care that the apache process can read this dir.
care that the apache process can read this dir.


To make use of Capacity you also need to git clone git://anongit.kde.org/websites/capacity into a folder called media.
To make use of Capacity you also need to git clone git://anongit.kde.org/websites/capacity into a folder called media.
For www.kde.org use:
  svn checkout svn+ssh://[email protected]/home/kde/trunk/www/sites/www<br>
  cd www<br>
  git clone kde:websites/capacity media
You must have 'php_value include_path' in config, see below:


==Setup of the Apache vHost for the Staging==
==Setup of the Apache vHost for the Staging==
Line 19: Line 27:
vHost for your localhost running on port 8080.
vHost for your localhost running on port 8080.


{{Input|1=<nowiki>
   # listen on this port, too (mostly in file "listen.conf")
   # listen on this port, too (mostly in file "listen.conf")
   Listen 8080
   Listen 8080
Line 51: Line 60:
       AddType application/x-httpd-php .php
       AddType application/x-httpd-php .php
   </VirtualHost>
   </VirtualHost>
</nowiki>}}


{{note|Capacity doesn't work fine in subdirs of your documentroot, so it is recommended to setup a vHost for every kde site you intent to checkout.}}
{{note|Capacity doesn't work fine in subdirs of your documentroot, so it is recommended to setup a vHost for every kde site you intent to checkout.}}

Latest revision as of 13:48, 4 December 2019

Needed Software

On the machine you use for this setup, you need to have installed a Linux/*BSD with a working Apache (1 or 2) with mod_php4. You will need at least the PHP4 modules pcre (for Perl compatible regular expressions) and xml (for the UTF-8 encoding). PHP5 is recommended.

Getting the needed module from SVN or git

You need to checkout the appropriate www module from our SVN, it's located in /trunk/www, most of the sites using Capacity are in /trunk/www/sites. Some sites have migrated to git; The www module will be the documentroot of your apache, therefor keep care that the apache process can read this dir.

To make use of Capacity you also need to git clone git://anongit.kde.org/websites/capacity into a folder called media.

For www.kde.org use:

 svn checkout svn+ssh://[email protected]/home/kde/trunk/www/sites/www
cd www
git clone kde:websites/capacity media

You must have 'php_value include_path' in config, see below:

Setup of the Apache vHost for the Staging

You need to setup a vHost for the staging, here an example to have some vHost for your localhost running on port 8080.

  # listen on this port, too (mostly in file "listen.conf")
  Listen 8080
  
  # staging vhost in a conf file
  <VirtualHost 127.0.0.1:8080>
      # set documentroot + 404 handler
      DocumentRoot <path_to_www>
      ErrorDocument 404 /media/404.php

      # depending on the default you might need to allow
      # access to the dir, so disable the following:
      #<Directory "<path_to_www>">
      #    Order allow,deny
      #    Allow from all
      #</Directory>

      # you might want to catch the logs in separate files:
      #ErrorLog /var/log/apache2/kde.org-error_log
      #CustomLog /var/log/apache2/kde.org-access_log combined

      # php part
      php_value short_open_tag Off
      php_value register_globals No
      php_value allow_url_fopen Off
      php_value disable_functions system,exec,passthru,proc_open,shell_exec,popen,symlink
  
      php_value safe_mode On
      php_value include_path ".:<path_to_www>/media/includes"
      
      # enable .php, add .html here, for developer.kde.org
      AddType application/x-httpd-php .php
  </VirtualHost>

Note

Capacity doesn't work fine in subdirs of your documentroot, so it is recommended to setup a vHost for every kde site you intent to checkout.


Using the Staging

After restarting your Apache, you should have a running staging area on http://127.0.0.1:8080. You can now simply access and test all *.kde.org sites within this vhost. They all will behave like they are on their own domain, in their own vhost.

If you checked out www.kde.org (/trunk/www/sites/www) it is now available under:

 http://127.0.0.1:8080/