Berkeley CSUA MOTD:Entry 20525
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2001/2/7 [Computer/SW/WWW/Server, Computer/SW/Languages/Misc] UID:20525 Activity:very high
2/6     web monkey question: how can I make a webpage include the
        contents of one html file from within another html file? for
        example, I want my webpage, index.html to include the contents
        of a file called title.html whenever it's loaded, so that I
        can change titles by just changing title.html without touching
        index.html. what's the easiest way to do this?
        \_ you need some kind of server-side processing done.  the exact
           details it will depend on what kind of web server you're using.
           Most of the time you'd just add a line like the following to your
           page: <!--#include file="foo.html" --> .  You may need to
           specifically enable SSI on your web server and give your pages
           a special extension (e.g. .shtml, .asp, ...)
           \_ my webserver is Apache. Do I need to call the file index.shtml?
              anything else I need to do?
              \_ you might need to modify your .htaccess file.  See
                 http://httpd.apache.org/docs/mod/mod_include.html
                 Note that if the web server you're talking about is soda,
                 you don't need to do anything special; just add the
                 <!--#include ... --> line.
           \_ can you specify a url for the content of a CSS? -ali
              \_ URLs to cascading style-sheets can be given in a <LINK ...>
                 tag, which will be handled by the client, not the server.
              \_ not afaik, but you probably could use a combination of
                 SSI and <style> ... </style> tags to do what you want.
2025/05/25 [General] UID:1000 Activity:popular
5/25    

You may also be interested in these entries...
2010/4/19-5/10 [Computer/SW/Security, Computer/SW/WWW/Server] UID:53791 Activity:nil
4/18    http://Apache.org hacked:
        http://www.theinquirer.net/inquirer/news/1601103/apache-hacked
	...
2010/4/22-5/10 [Computer/SW/Languages/Misc] UID:53797 Activity:nil
4/22    In Linux is there an easy way to rename the scripts in /etc/rc?.d ?
        For example I want to set all the /etc/rc?.d/S91apache to S100apache
        so that it'll run the ramdisk BEFORE going to apache.
        \_ Sure, just move them.
           \_ I mean is there a script that will rename all of them
              for me? Like: setrc apache2 0 0 1 1 1 1
	...
2010/1/22-30 [Computer/HW/Laptop, Computer/SW/OS/OsX] UID:53655 Activity:high
1/22    looking to buy a new development laptop
        needs ssdrive, >6 hr possible batt life, and runs linux reasonably
        Anyone have a recommendation? Thx.
        \_ thinkpad t23 w ssdrive and battery inplace of drive bay
        \_ Ever wondered what RICHARD STALLMAN uses for a laptop?  Well,
           wonder no more!
	...
2010/1/12-29 [Computer/SW/Apps/Media] UID:53627 Activity:kinda low
1/12    How do I get a job NOT related to internet DNS social network cloud
        twitter GOOG EC2 amazon API ???
        \_ A CS job not related to API?
        \_ Chip design, or maybe software that does chip design. What is
           your major? How about game developer?
        \_ DNS? DNS? What era ado you live in? I agree that social network
	...
2009/12/7-2010/1/3 [Computer/HW/Memory, Computer/HW] UID:53574 Activity:nil
12/7    How many TCP retransmits are too many? Here is what I get:
            3594143433 segments received
            3760174421 segments send out
            3801829561 segments retransmited
        \_ rephrase. you can never have too much money. or too little.
           what is, is.
	...
2009/7/8-16 [Computer/SW/OS/Linux, Computer/SW/Unix] UID:53124 Activity:nil
7/7     what happened to our web presence? http://www.csua.berkeley.edu
        not working
    \_ That would be because we've yet to set them up afaik. Steven *does* have
    a job after all. The idea is that we want a separate computer mounting the
    web directories, so that if an exploit compromises the webserver, the shell
    server (soda) itself will be insulated from the attack.
	...
2009/5/7-14 [Computer/SW/WWW/Server] UID:52963 Activity:nil
5/7     I am trying to reproduce a customer bug where their apache header
        has the content-encoding as the last line in the header.
        My test platform is running apache2.2 on ubuntu. Is there a way
        to do this ?i I have already read the apache 2.0 docs and
        I dont see anything obvious ? page is txt/html
	...
2009/5/5-6 [Computer/HW/Laptop] UID:52950 Activity:moderate
5/5     Is there a good (or standard) way to make an offline copy of a w
        ordpress blog (mine, not someone else's)? tia.
        \_ oh man.
           \_ I could cobble something together with curl / wget, but I'd
              rather not if there is a standard way of doing this.  I'm
              pretty new to wordpress / blogging and I just want to keep
	...
2009/3/8-17 [Computer/SW/Unix] UID:52685 Activity:kinda low
3/8     I'm reading about an old exploit where someone used a buffer overflow
        in a printer daemon to get "daemon privileges," which allowed them
        to use another exploit on the mail delivery program to get root.  I'm
        not sure what daemon privileges are.  Is there some set of priveleges
        that most daemons run on that is higher than user but lower than root?
        What are they?  I've never heard this before.
	...
2008/10/14-20 [Computer/SW/Languages/Misc, Computer/SW/Languages/Web] UID:51527 Activity:nil
10/14   2 apache 2.0.52 servers running on Linux boxes.  Identical httpd.conf
        files (except for ServerName).  But on one, if a CGI script takes
        longer than 300 seconds, it times out.  The other, not.  Why is that?
        \_ Perhaps network equipment configuration. Or try comparing settings
           in /proc/sys/net.
           \_ I ran /sbin/sysctl -a | grep tcp, all settings are the same.
	...
2008/9/3 [Computer/SW/Unix] UID:51030 Activity:nil
9/3     Okay, my sed and awk skills are obviously not up to par here.
        I want to only see the "500's" in my apache error log, how do I
        do that? I want to see the whole line, not just the 500 error code.
        Never mind, grep " 500 " is close enough.
	...
2013/4/9-5/18 [Computer/SW/Mail, Academia/Berkeley/CSUA] UID:54647 Activity:nil
4/8     What's a good free e-mail provider? I don't want to use Gmail,
        Yahoo, Outlook, or any of those sites with features I never use that
        track my personal info and keep changing their interface. I want just
        simple e-mail without privacy issues or all the baggage these large,
        for-profit companies are adding. I might even be willing to pay.
        Recommendations?
	...
Cache (5681 bytes)
httpd.apache.org/docs/mod/mod_include.html
Any dates printed are subject to the currently configured timefmt. Attributes: var The value is the name of the variable to print. If set to "url", then URL encoding (also known as %-encoding; At the start of an echo element, the default is set to "entity", resulting in entity encoding (which is appropriate in the context of a block-level HTML element, eg. This can be changed by adding an encoding attribute, which will remain in effect until the next encoding attribute is encountered or the element ends, whichever comes first. Note that the encoding attribute must precede the corresponding var attribute to be effective, and that only special characters as defined in the ISO-8859-1 character encoding will be encoded. This encoding process may not have the desired result if a different character encoding is in use. The IncludesNOEXEC 10 Option disables this command completely. The valid attributes are: cgi The value specifies a (%-encoded) URL relative path to the CGI script. If the path does not begin with a , then it is taken to be relative to the current document. The document referenced by this path is invoked as a CGI script, even if the server would not normally recognize it as such. However, the directory containing the script must be enabled for CGI scripts (with 11 ScriptAlias or the ExecCGI 12 Option). The CGI script is given the PATH_INFO and query string (QUERY_STRING) of the original request from the client; The include variables will be available to the script in addition to the standard 13 CGI environment. The 14 include virtual element should be used in preference to exec cgi. The 15 include variables are available to the command, in addition to the usual set of CGI variables. The use of 16 #include virtual is almost always prefered to using either #exec cgi or #exec cmd. The former (#include virtual) used the standard Apache sub-request mechanism to include files or scripts. In addition, on some platforms, like Win32, and on unix when using suexec, you cannot pass arguments to a command in an exec directive, or otherwise include spaces in the command. Attributes: file The value is a path relative to the directory containing the current document being parsed. If it does not begin with a slash then it is taken to be relative to the current document. Any included file is subject to the usual access control. If the directory containing the parsed file has the 17 Option IncludesNOEXEC set, and the including the document would cause a program to be executed, then it will not be included; Otherwise CGI scripts are invoked as normal using the complete URL given in the command, including any query string. The valid attributes are: file The value is a path relative to the directory containing the current document being parsed. Therefore, you cannot include files that are outside of the document root, or above the current document in the directory structure. The virtual attribute should always be used in preference to this one. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash then it is taken to be relative to the current document. A URL is constructed from the attribute, and the output the server would return if the URL were accessed by the client is included in the parsed output. If the specified URL is a CGI program, the program will be executed and its output inserted in place of the directive in the parsed file. Include Variables In addition to the variables in the standard CGI environment, these are available for the echo command, for if and elif, and to any program invoked by the document. DOCUMENT_NAME The filename (excluding directories) of the document requested by the user. DOCUMENT_URI The (%-decoded) URL path of the document requested by the user. Note that in the case of nested include files, this is not then URL for the current document. LAST_MODIFIED The last modification date of the document requested by the user. USER_NAME Contains the owner of the file which included it. Variable Substitution Variable substitution is done within quoted strings in most cases where they may reasonably occur as an argument to an SSI directive. This includes the config, exec, flastmod, fsize, include, and set directives, as well as the arguments to conditional operators. The test condition is evaluated and if the result is true, then the text until the next elif, else. The elif or else statements are be used the put text into the output stream if the original test_condition was false. If string2 has the form /string/ then it is compared as a regular expression. Regular expressions have the same syntax as those found in the Unix egrep command. Unquoted strings can't contain whitespace (blanks and tabs) because it is used to separate tokens such as variables. If multiple strings are found in a row, they are concatenated using blanks. So, string1 string2 results in string1 string2 'string1 string2' results in string1 string2 Using Server Side Includes for ErrorDocuments There is 19 a document which describes how to use the features of mod_include to offer internationalized customized server error documents. This directive only affects files associated with the MIME type text/html. XBitHack can take on the following values: off No special treatment of executable files. If it is set, then set the Last-modified date of the returned file to be the last modified time of the file. Setting this bit allows clients and proxies to cache the result of the request. Note: you would not want to use this, for example, when you #include a CGI that produces different output on each hit (or potentially depends on the hit).