1 installation Ubuntu 14.04 -bit operating system
2 installation Apache and the Sqllite and the dependent Sqllite Development Library
3 Configuration Directory /etc/apache2
4 HTML Page Catalog var/www/
5 Cgi-bin Catalogue /usr/lib/cgi-bin
6 log file: /var/log/apache2
7 Site Configuration: cd/etc/apache2/sites-enabled
VI 000-default.conf ( location of the virtual site )
8 Enter /etc/apache2/ catalog, viewing apache2.conf ( This is a master Apache configuration file ) This includes Web some common configurations in the server.
9 Enter /etc/apache2/mods-enable , increase support CGI of the MoD
Cd/etc/apache2/mods-enabled sudo ln-s. /mods-available/cgid.conf sudo ln-s. /mods-available/cgid.load sudo ln-s. /mods-available/cgi.load |
Ten about the Apache related commands for server restart:
Linux System for Ubuntu When: First, Start Apache 2 Server / Start Apache Server #/etc/init.d/apache2 Start Or $ sudo/etc/init.d/apache2 Start Second, Restart Apache 2 Server / Restart Apache Service #/etc/init.d/apache2 Restart Or $ sudo/etc/init.d/apache2 Restart Third, Stop Apache 2 Server / Stop Apache Service #/etc/init.d/apache2 Stop Or $ sudo/etc/init.d/apache2 Stop |
Access Apache Server:
Ten Edit CGI Code: /usr/lib/cgi-bin/setscore.c
before you edit the Cgi-bin Directory Assignment Permissions
chmod 777/usr/lib/cgi-bin/
setscore.c the contents are as follows:
sudo gcc/usr/lib/cgi-bin/setscore.c-o/usr/lib/cgi-bin/setscore.cgi
Open Web Access cig, (IP address is:192.168.28.155)
at this point, Apache Server Configuration succeeded
Linux under Apache Server installation, SQLite installation, Apache startup, shutdown, restart, write cig program to test, browser Access CIG program