Apache web server Guides
Commands
Configuration files
Installation history 13 November 2006: directory acccess on apache2 On the new spello (we still grieve the overwriting of the old
/dev/hda drive, with the /sh partition!), allow indexes selectively: Note that what matters here is whether you include "Indexes" in the Options line. This is how this is handled now, instead of .htaccess files. Not sure whether these files are still read and what they can be used for. 17 June 2005: .htaccess on apache I modified spello:/etc/apache/httpd.conf from this AllowOverride Noneto this AllowOverride Allso that .htaccess files would work -- and now they do. Set them up in /share/wikis. To add users, htpasswd cgi-bin/.htpasswd <user>and then add an .htpasswd in the wiki directory. Works! On 26 January 2005 I installed apache 1.3.33-3 on spello. On 3 May 2004 I upgraded apache (to 1.3.29.0.2-6) and php4 (to 4.3.4-4) on cyberspace. I get the message, apache has switched to use logrotateI didn't do anything about this -- maybe I should tell mose. On 20 July 2002 I changed the Apache configuration file cyberspace:/etc/httpd/httpd.conf to allow .htaccess to override the default settings with the command "AllowOverride All" -- I could be more restrictive but this seems fine, especially since I'm only using it for Athena Productions. I also looked into the "EnablePut" command that Mark suggested, but it turns out it needs the module mod_put, which is a possible security risk. It also needs to be integrated and the mod put home page (where you also find the source code) recommends doing this when Apache is compiled. It's possible that mod_put.so just needs to be placed in /usr/lib/apache/, but it may need compiling and it's not clear it's worth the hassle. Netscape Gold apparently uses this put method; cf. info. SuSE may have a module patch. On 29 April 2002 I determined that the default directory for web pages is /usr/local/httpd/htdocs/ -- logically enough. The http daemon has been running from the beginning of this installation, but I haven't known how to access it. Now I know how to put pages on the server, and am in effect running my own web server finally! Not that it took much of me... I created a link from /home/steen/mnt/web/ to /usr/local/httpd/htdocs/ so that I can move files directly from Spello to Cyberspace (and I should rename the machines in some reasonable fashion), using this command:
Note that the first parameter after -sf (symbolic forced) is the target directory, and the second the new symbolic file. This works beautifully -- I added the site to Dreamweaver. SuSE days To do
Configuration files
The main server name is currently set as 128.97.211.32, as defined in /etc/rc.config -- this works for the moment. There is currently no way to get to the document root and show the dancing penguin On 8 May 2002 I renamed this machine from Julie to Cyberspace by using Yast2 | Network configuration and rebooting. I also edited /etc/hosts. In /etc/rc.config I said "yes" to ipv6 admin and to accessing desktop remotely -- I haven't tested this. In Yast2 I also removed some users, namely:pop (dialup), sapdb (SAP demo), dpbox (local ham radio), I also created the user cyberweb (user ID 501 and pw cy4ucla) through Yast2 and the directory cyberspace under the web serving directory. I gave ownership of this directory to cyberweb with the following command:
I then created a link to this directory from /home/cyberweb with this command:
so that the user cyberweb can use FTP to access the web page for editing purposes. It all seems to work -- I had to allow local user login in /etc/vsftpd.conf. On 8 May 02 I received confirmation from Julie Chen that 128.97.184.95 has been assigned the domain name (www).cyberspace.ucla.edu. I really wanted that address to point to the /cyberspace subdirectory -- and Julie writes, "You will need to setup virtual host for the apache web server." I guess I could just define /cyberspace as the server root? In /etc/httpd/httpd.conf, the main configuration file for the Apache webserver, I found the option to define the root server, currently
I left this alone for the moment, until I've figured out virtual hosts. The document root is a bit different, currently
SuSE complications
The only module that gets loaded through these files is userdir_module -- looks unproblematic. Virtual Hosts -- from /etc/httpd/httpd.conf
I defined this set of virtual hosts:
Type apachectl restart to reload the conf file, and httpd -S to see the virtual host configuration. This now works perfectly. For some obscure reason, entering
made that address consistently go to /usr/local/httpd/htdocs/ even though I explicitly defined a different document root. Anyway, this is fixed, and you are free to use the site for other things aside from CyberSpace@UCLA. Later, you might do something like this:
Plain old http://128.97.184.95/ no longer gets you to the document root and the dancing penguin, which is a pity, but hardly matters -- what actually matters is that you can serve pages from more than one DNS entry from the same IP number.. File permissions Directories: chmod 755 to allow execution for the web site to be accessible. I had to give the "umask 002" command to make 664 the default user file creating permission -- in fact, I had to change that in the vsftpd configuration file -- which could actually be useful for vsFTPd purposes, and which is necessary to be able to maintain a joint FTP access to the files. It seems to work fine. PHP extensions On 12 May 2002, Andrew Liau said he'd like to use PHP extensions, and I found instructions for how to do it. In brief,
A number of mod_php patches are listed in /var/lib/Yast/patches/i386/update/7.3/patches, but it's not clear it's what I want. I found the RPM file for the mod_php core installation, but it had a slew of dependencies, there were security issues, and the files were not on my SuSE personal distribution CDs. I decided to leave this until I upgrade to SuSE 8.
|
|
|
|
|||||
Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles |