Apache

see ServerConfiguration and  oreilly tutorial

Instruction for Ubuntu

  • after  installing apache2 copy "<html><body><h1>Apache works!</h1></body></html>" to /var/www/index.html
  • go to  http://localhost and it should display "Apache works!"
  • mv /var/www/index.html /var/www/index.php
  • copy <?php phpinfo(); ?> to /var/www/index.php
  • go to  http://localhost and it should display all php configurations
  •  enable CURL extensions in php.ini
    • check whether the configuration was added automatically when installing php-curl (a file curl.ini was added to /etc/php5/apach2/conf.d and includes the line "extension=curl.so")
    • if not use phpinfo() to find out the php.ini path ("Loaded Configuration File" usually points to /etc/php5/apache2/php.ini as /etc/php5/cli/php.ini is used to configure the command-line client) or where to add the curl.ini file ("Scan this dir for additional .ini files")
  • copy "<?php echo '<pre>'; var_dump(curl_version()); echo '</pre>'; ?>" to /var/www/index.php
  • you should not see "Fatal error: Call to undefined function curl_version() in /var/www/index.php on line 5" when refreshing  http://localhost
  • Make sure that a mod_rewrite-compatible engine is working: sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load

add a local domain such as " http://panta.mm.net"

  • create a link to the sources: /var/www/panta --> /home/{your-path}/src/panta/trunk
  • add 127.0.0.1 panta.mm.net to /etc/hosts
  • add the below file as /etc/apache2/sites-enabled/panta.mm.net
    <VirtualHost *:80>
    	ServerAdmin c.mueller@jacobs-university.de
    	ServerName panta.mm.net
    
    	DocumentRoot /var/www/panta
    	<Directory /var/www/panta>
              AllowOverride All
    	</Directory>
    	
    	# Tomcat integration
    	#JkMount /* default
    
            RewriteLog "/var/www/panta/rewrite.log"
            
    	ErrorLog /var/log/apache2/panta.mm.net.error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog /var/log/apache2/panta.mm.net.access.log combined
    	ServerSignature On
    	
    	Alias /icons/ "/usr/share/apache2/icons/"
    	<Directory "/usr/share/apache2/icons">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    </VirtualHost>
    

further info

Special configurations for the panta project

Deploying panta on the KWARC servers

  • currently panta is running on raspberry, configuration differs to the above
  • check /etc/apache2/sites-enabled/panta.kwarc.info