User Tools

Site Tools


html_css_javascript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
html_css_javascript [2018/12/10 12:06] – external edit 127.0.0.1html_css_javascript [2022/04/22 20:30] (current) – external edit 127.0.0.1
Line 3: Line 3:
   *  [[https://www.cyberciti.biz/tips/installing-and-configuring-lighttpd-webserver-howto.html|General install and config]]   *  [[https://www.cyberciti.biz/tips/installing-and-configuring-lighttpd-webserver-howto.html|General install and config]]
   *  [[https://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config|When the web server is running but you cannot connect to it!]]   *  [[https://redmine.lighttpd.net/projects/lighttpd/wiki/IPv6-Config|When the web server is running but you cannot connect to it!]]
 +  * [[https://redmine.lighttpd.net/boards/2/topics/5622|mod_alias & mod_rewrite modules in the right order]]
 +
 +==== Installing a lighttpd webserver without root access ====
 +This is not dificult but if a local version of Perl is also being used, it may be tricky to get the local version of Perl modules to run (See [[Perl|Install additional modules locally without root access]])
 +
 +This is an example of a lighttpd.conf file that works for me (serving Perl pages from the locally installed Perl)
 +<code>
 +# ============================================================================================================
 +# see full config example at
 +# https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/master/entry/doc/config/lighttpd.conf
 +# ============================================================================================================
 +
 +var.root = "<your home directory>"
 +var.log_root = root + "/lighttpd/log"
 +var.doc_root = root + "/dbahawk_server"
 +
 +setenv.add-environment = ("PERL5LIB" => root + "/perl5/lib/perl5")
 +
 +server.modules = (
 +    "mod_access",
 +    "mod_cgi",
 +    "mod_alias",
 +    "mod_accesslog",
 +    "mod_compress",
 +    "mod_redirect"
 +)
 +# this assigns the local Perl but does not catch the local value of PERL5LIB, so... cgi.assign    = ( ".pl"  => root + "/opt/perl/bin/perl",
 +cgi.assign    = ( ".pl"  => root + "/opt/perl/bin/execperl.ksh",
 +                  ".py"  => "/usr/bin/python"
 +)
 +
 +server.document-root = doc_root + "/html"
 +server.port          = 3000
 +server.errorlog      = log_root + "/error.log"
 +#server.pid-file      = "lighttpd.pid"
 +#server.username      = "u024124"
 +#server.groupname     = "cln"
 +#server.port          = 3000
 +
 +mimetype.assign = (
 +    ".html" => "text/html",
 +    ".txt" => "text/plain",
 +    ".jpg" => "image/jpeg",
 +    ".css" => "text/css",
 +    ".png" => "image/png"
 +)
 +
 +index-file.names               = ( "index.php", "index.html", "index.pl" )
 +#static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
 +alias.url                     += ( "/cgi-bin" => doc_root + "/cgi-bin/" )
 +url.access-deny                = ( "~", ".inc" )
 +
 +
 +
 +#auth.backend = "plain"
 +#auth.backend.plain.userfile = "/etc/lighttpd/.lighttpdpwd"
 +
 +#auth.require = ( "/var/www" =>
 +#(
 +#.method. => "basic",
 +#.realm. => "Authentication required",
 +#.require. => "user=admin"
 +#)
 +#)
 +
 +</code>
 +where execperl.ksh looks like this
 +<code>
 +#!/usr/bin/env ksh
 +export PERL5LIB="${HOME}/opt/perl:${PERL5LIB}"
 +export PATH="${HOME}/opt/perl/bin:${PATH}"
 +exec perl
 +</code>
 +
 +=== Use the new version of Perl ===
 +<code>
 +vi $HOME/.bashrc
 +export PERL5LIB="/home/users/u024124/perl5/lib/perl5"
 +export PATH="${HOME}/opt/perl/bin:${PATH}"
 +</code>
 +
 +=== Syntax check the webserver config ===
 +<code>
 +cd /home/users/u024124/lighttpd/sbin
 +./lighttpd -tf ../etc/lighttpd.conf
 +</code>
 +=== Start the webserver ===
 +<code>
 +./lighttpd -Df ../etc/lighttpd.conf >/dev/null 2>&1 &
 +</code>
 +
 +==== Bootstrap ====
 +  * [[https://getbootstrap.com/docs/4.0/components/navs/|How to use Bootstrap 4’s included navigation components]]
 +  * [[https://www.w3schools.com/bootstrap/default.asp|w3schools.com - Bootstrap 3]]
 +  * [[https://getbootstrap.com/docs/4.1/utilities/spacing/|Spacing with Bootstrap 4]]
  
html_css_javascript.1544443601.txt.gz · Last modified: 2018/12/10 12:06 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki