This is an example to build Web Server. Install Apache2 for it. In addition to do it, it's also neccessary to configure router so that TCP and UDP packets to 80 and 443 can pass through.
1.Install Apache2
root@www05:~# aptitude -y install apache2
2.Configure Apache2 to use CGI in any directory
root@www05:~# vi /etc/apache2/conf.d/security
# line 27: change
ServerTokens Prod
# line 39: change
ServerSignature Off
root@www05:~# vi /etc/apache2/mods-enabled/dir.conf
# line 3: add file name that it can access only with directory's name
DirectoryIndex index.html index.cgi
root@www05:~# vi /etc/apache2/mods-enabled/mime.conf
# line 165: uncomment and add extensions for CGI
AddHandler cgi-script .cgi .pl
root@www05:~# vi /etc/apache2/sites-available/default
# line 2: change to webmaster's email
ServerAdmin webmaster@server.world
# line 10: change ( remove "Indexes" )
Options FollowSymLinks ExecCGI
# line 11: change
AllowOverride All
root@www05:~# ln -s /usr/bin/perl /usr/local/bin/perl
root@www05:~# /etc/init.d/apache2 restart
* Restarting web server apache2
... waiting ...done.
3. Access to "http://(your server's hostname or IP address)/" with web browser. It's OK if following page is shown. (default page)
4. Create a CGI test page and access to it with web browser. It's OK if following page is shown.
root@www05:~# vi /var/www/index.cgi
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print <<"EOM";
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">
CGI Test Page
</div>
</body>
</html>
EOM
exit;
root@www05:~# chmod 705 /var/www/index.cgi
Subscribe to:
Post Comments (Atom)
Thanks for sharing what's on your heart today.
ReplyDeleteAs we discussed, you know exactly what you're doing and where you're going. There is no doubt about that, whatsoever. I enjoy your friendship immensely, and have a world of faith in you.
jocuri yoob | juegos gahe| y9 games | juegos de loola | Jeux de yoob | action henk game | gahe 2
Thank you for your friendship and the time you spent. Those moments changed my day — heck, the rest of the year and then some. I appreciate your faith and perspective.
No, not at all, Iwinski said. "Having said that, if they were delivery on Oct 8 and they would declare it before us, then we would look, I don't know, for Nov or something. Because there are so few RPGs that it's really a very ridiculous concept to provide them simultaneously."
firv | mafa 2 | loola games | juegos gahe | 7k8x games | fryv | zoxy games
Thank you, Bill. It's on days such as these that the very sweetness of friendship acts like a natural and refreshing condiment subduing the other flavors and feelings I was experiencing.
wow your site is amazing, keep share with us. very nice interior, i love all. thanks for share :)
k7x | juegos de yoob | jogos mafa | ozov | jogos gahe | friv for school | friv4school
wow your site is amazing, keep share with us. very nice interior, i love all. thanks for share :)
Loola games | Frozen games | Frozen games | Loola Frozen
gathered useful information on this point . Thank you posting relative information and its now becoming easier to complete this assignment
ReplyDeletebrainpop