Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on Apache. # # Note 1: use the eev command (defined in eev.el) and the # ee alias (in my .zshrc) to execute parts of this file. # Executing this file as a whole makes no sense. # An introduction to eev can be found here: # # (find-eev-quick-intro) # http://angg.twu.net/eev-intros/find-eev-quick-intro.html # # Note 2: be VERY careful and make sure you understand what # you're doing. # # Note 3: If you use a shell other than zsh things like |& # and the for loops may not work. # # Note 4: I always run as root. # # Note 5: some parts are too old and don't work anymore. Some # never worked. # # Note 6: the definitions for the find-xxxfile commands are on my # .emacs. # # Note 7: if you see a strange command check my .zshrc -- it may # be defined there as a function or an alias. # # Note 8: the sections without dates are always older than the # sections with dates. # # This file is at <http://angg.twu.net/e/apache.e> # or at <http://angg.twu.net/e/apache.e.html>. # See also <http://angg.twu.net/emacs.html>, # <http://angg.twu.net/.emacs[.html]>, # <http://angg.twu.net/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### # «.apache_basic_inst» (to "apache_basic_inst") # «.apt-http-local» (to "apt-http-local") # «.apache_hard_restart» (to "apache_hard_restart") # «.apache_orig_config» (to "apache_orig_config") # «.apache2-on-etch» (to "apache2-on-etch") # «.usr-lib-cgi-bin» (to "usr-lib-cgi-bin") # (find-status "apache") # (find-vldifile "apache.list") # (find-udfile "apache/") # (find-zsh "installeddebs | sort | grep apache") # (find-zsh "availabledebs | sort | grep apache") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) aptrm apache2-bin apache2-data apache2-utils aptrm php7.4 aptrm php7.4-fpm # http://127.0.0.1/ # HTTP/1.1: (find-rfcfile "rfc2068.txt") # HTTP/1.0: (find-rfcfile "rfc1945.txt") ##### # # Apache installation/configuration (basic) # 1999aug09 (ok 2000apr08) # ##### # «apache_basic_inst» (to ".apache_basic_inst") # (find-es "http" "runtmpcgi") apti apache apache-doc # (find-vldifile "apache.list") # (find-fline "/usr/doc/apache/") # (find-vldifile "apache-doc.list") # (find-udfile "apache-doc/") # (find-fline "/etc/apache/httpd.conf" "ServerType") # ServerType standalone # (find-fline "/etc/apache/httpd.conf" "#ServerName host.some_domain.com") # ServerName angg # (find-fline "/etc/apache/srm.conf" "AddHandler cgi-script .cgi") # AddHandler cgi-script .cgi # (find-fline "/etc/apache/access.conf" "\nOptions") # Options Indexes FollowSymLinks ExecCGI /etc/init.d/apache restart # Test if apache is working: # lynx http://127.0.0.1/ apti info2www lynx http://localhost/cgi-bin/info2www ##### # # setting up a local http apt source # 2000dec02 # ##### # «apt-http-local» (to ".apt-http-local") # (find-fline "/etc/apache/srm.conf" "Alias /doc/ /usr/doc/") #Alias /debian/ /hdd6/debian/ #Alias /debian/dists/sid/ /snarf/ftp/ftp.debian.org/debian/dists/sid/ # (find-fline "/etc/apt/sources.list") #deb http://127.0.0.1/debian potato main contrib /etc/init.d/apache restart lynx http://127.0.0.1/debian/dists/potato/ lynx http://127.0.0.1/debian/dists/sid/ # What URLs apt will look for, corresponding to the line above: cd /tmp/ rm Packages* wget http://127.0.0.1/debian/dists/potato/contrib/binary-i386/Packages.gz wget http://127.0.0.1/debian/dists/potato/main/binary-i386/Packages.gz apt-get update |& tee ~/o # (find-fline "~/o") # Hm, I may not have the .gzs, and will have to create them now: # (find-fline "/hdd6/debian/dists/potato/contrib/binary-i386/") # (find-fline "/hdd6/debian/dists/potato/main/binary-i386/") # for i in /hdd6/debian/dists/potato/{contrib,main}/binary-i386/; do cd $i cat Packages | gzip -c9 > Packages.gz touch -r Packages Packages.gz pwd laf P* done ##### # # Apache's main packages # ##### # (find-vldifile "apache.list") # (find-vldifile "apache-common.list") # (find-vldifile "apache-dev.list") # (find-vldifile "apache-doc.list") # (find-fline "/usr/doc/apache/") # (find-fline "/usr/doc/apache-common/") # (find-fline "/usr/doc/apache-dev/") # (find-fline "/usr/doc/apache-doc/") # (find-fline "/usr/doc/apache/examples/") # (find-fline "/usr/doc/apache/examples/printenv") # (find-fline "/usr/doc/apache/examples/test-cgi") apti apache-doc # (find-vldifile "apache-doc.list") # (find-fline "/usr/doc/apache-doc/") edrxnetscape /usr/doc/apache/manual/index.html & # (find-fline "/etc/apache/") # (find-fline "/etc/init.d/apache") bash -x /etc/init.d/apache restart bash -x /etc/init.d/apache reload-modules # (find-fline "/usr/doc/apache/manual/invoking.html" "the files are:") cd /etc/apache/ for i in httpd.conf srm.conf access.conf; do echo "\n $i:" egrep -v "^(#|[ \t]*\$)" $i done # (find-fline "/usr/doc/apache/manual/invoking.html") ##### # # Apache and demo cgis # ##### dpkg -iE apache # # (find-fline "/etc/apache/httpd.conf") # no final: ServerName 0.0.0.0 # (find-fline "/etc/apache/access.conf" "Options Indexes FollowSymLinks") # appendar ExecCGI # (find-fline "/etc/apache/srm.conf" "AddHandler cgi-script .cgi") # (find-esfile "perl.e" "/var/www/perlex/") # ln -sf /usr/bin/perl /usr/local/bin/perl ln -sf ~/mycgis /var/www/mycgis /etc/init.d/apache restart rm -Rv /var/www/perlex/ mkdir /var/www/perlex/ cd /var/www/perlex/ cp -iv /usr/doc/perl/examples/cgi/* . gzip -dv * perl RunMeFirst chmod 755 *.cgi chown edrx:edrx -Rc /var/www/perlex ##### # # Really restarting Apache # 2000may20 # ##### # «apache_hard_restart» (to ".apache_hard_restart") cd ~/ivox/htdocs/ cd ~/ivox/htdocs/cgi-sbin/ # (find-ivfile "" "erro") # (find-ivfile "" "pid.txt") # (find-ivfile "" "saida.txt") # (find-fline "/etc/apache/srm.conf" "cgi-bin") # (find-fline "/etc/apache/srm.conf" "DocumentRoot") # (find-fline "/etc/apache/") /etc/init.d/apache restart /etc/init.d/apache stop ps ax | grep apache | grep -v grep /etc/init.d/apache start ps ax | grep apache | grep -v grep sleep 1 ps ax | grep apache | grep -v grep lynx http://127.0.0.1/ ##### # # Apache - back to the original config # 2000may30 # ##### # «apache_orig_config» (to ".apache_orig_config") debtarxvzf $POTATO/$MI386/web/apache_1.3.9-12.deb -C / # Ops - this jumps over the configuration scripts! dpkg --purge apache apti apache # (find-fline "/etc/apache/") # (find-fline "/etc/apache/httpd.conf" "ServerName") apacheconfig # Allow cgis: # (find-es "http" "apache_basic_inst") # # (find-fline "/etc/apache/srm.conf" "AddHandler cgi-script .cgi") # AddHandler cgi-script .cgi # (find-fline "/etc/apache/access.conf" "\nOptions") # Options Indexes FollowSymLinks ExecCGI # # (find-fline "/etc/apache/srm.conf" "DirectoryIndex index.html") # DirectoryIndex index.cgi # (find-apadocw3 "") # (find-apadocw3 "cgi_path.html") # (find-apadocw3 "handler.html") # (find-apadocw3 "suexec.html") # (find-es "locz" "apache_hard_restart") /etc/init.d/apache restart # Test: lynx http://127.0.0.1/cgi-bin/wikit/ /etc/init.d/apache stop ps ax | grep apache | grep -v grep /etc/init.d/apache start ps ax | grep apache | grep -v grep sleep 1 ps ax | grep apache | grep -v grep lynx http://127.0.0.1/usr/index.cgi # (find-fline "/var/log/apache/") # (find-fline "/var/www/") # (find-fline "/var/www/usr/") ##### # # apache2 on etch, at port 8080 # 2007may25 # ##### # «apache2-on-etch» (to ".apache2-on-etch") # (find-status "apache") # (find-vldifile "apache.list") # (find-udfile "apache/") # (find-status "apache2") # (find-vldifile "apache2.list") # (find-udfile "apache2/") ##### # # the directory /usr/lib/cgi-bin/ # 2007jul20 # ##### # «usr-lib-cgi-bin» (to ".usr-lib-cgi-bin") # (find-zsh "dmissing etc/apache2/") # (find-status "apache2.2-common") # (find-vldifile "apache2.2-common.list") # (find-vldifile "apache2.2-common.list" "/etc/apache2/") # (find-fline "/etc/apache2/") # (find-fline "/etc/apache2/apache2.conf" "Include /etc/apache2/sites-enabled/") # (find-fline "/etc/apache2/sites-enabled/") # (find-fline "/etc/apache2/sites-available/") # (find-fline "/etc/apache2/sites-available/default") # (find-fline "/etc/apache2/sites-available/default" "ScriptAlias /cgi-bin/") # (find-fline "/etc/apache2/sites-available/default" "Options ExecCGI") # (find-fline "/var/") sudo dpkg-reconfigure apache sudo dpkg-reconfigure apache2 # (find-debpkg-links "apache") # (find-vldifile "apache.templates" "apache/server-port") # (find-fline "/var/cache/debconf/config.dat" "Name: apache/server-port") # (find-udfile "apache/config.layout.gz") # (find-sh "ps ax") # (find-fline "/var/www/") # (find-fline "/var/www/tmp/") # http://localhost:8080/tmp/ # http://localhost/tmp/ # (find-zsh "installeddebs | sort" "apache") # (find-zsh "availabledebs | sort" "apache") # (find-es "http" "thttpd") # (find-fline "/var/www/tmp/foo.php") # (find-zsh "availabledebs | sort" "php5") apti libapache-mod-php5 sudo /etc/init.d/apache restart // (find-fline "/var/www/tmp/foo.php") // (find-fline "/var/www/tmp/phptest-inc.php") http://localhost:8080/tmp/phptest-inc.php # (find-fline "/etc/php5/") # (find-status "php5") # (find-status "php5-doc") # (find-vldifile "php5-doc.list") # (find-udfile "php5-doc/") # (find-status "apache2-doc") # (find-vldifile "apache2-doc.list") # (find-udfile "apache2-doc/") # Local Variables: # coding: utf-8-unix # End: