So I've got a box running 10.04LTS Server, and on it is running the latest build of Apache2.
It's a home box - a server set up for the sole purpose of experimenting and having fun with. So far, the fun is mostly breaking it over SSH and then fixing it when I get home and can log into it via recovery. Whee. (no, it's still fun, just frustrating)
What I really want to do is to get this box set up with Apache2 the way it seems like it was designed - with Apache2 serving web pages from its default file location (/var/www) but also being able to log in and upload/download new web page files to that directory over SCP or SFTP. I keep hitting snags.
Here's what I've done so far:
1. The server is set up in a DMZ at home and my router updates a Dynamic DNS record; so far I can SSH into it no problem.
2. Apache is working. I get my "it works!" page when I enter either the IP or the dyndns domain name.
3. SFTP is sort of working. I can log on using WinSCP and see the files and download them, but I can't upload to the default directory with my normal login.
Here's my issues:
1. I want to set up Apache *correctly*. To me, that means leaving it pointing to the default directory, but still being able to upload to that directory. I have not (and probably will not) enable the root account. I've set the permissions to 755. I've tried chown'ing the directory, but then it seems I can't view the webpages.
As a workaround, I created a www folder in my default user home directory and pointed Apache2 there in the 'default' file in /etc/apache2/sites-available. The changes read as follows:
That gives me a workaround for the default directory SFTP issue, but I would rather learn what I need to do to have it set up and working with default values.
Options Indexes FollowSymLinks MultiViews Includes
allow from all
2. You may notice I added Includes under the Options. My goal is to get server-side includes working. But they aren't. I have some existing webpages my work has set up - I using these as a template to use to adapt a flash movie I made to a specific resolution, as well as to learn how to optimize my flash for a webpage. Our webhost uses virtual hosting; I am not yet doing so. I'm not sure what they've done to set up the server-side includes, but the files they are using are all html files - no shtml. The include files themselves have either .htm or .html extensions. All of the pages have .html extensions.
My reading said that I need mod_include installed in Apache2. Where can I check to see that it is installed? Where do I need to add the Includes under Options? Is it in the right place? And finally, where do I need to add XBitHack on to enable it? This is the method that Apache suggests, but the documentation offers no clue as to where to put it. Most of the documentation out there refers to apache.conf, but that's the Apache 1.3 way of doing things.
I really just want this to be set up according to the defaults as much as possible. I want to have a good working knowledge of Apache and of how to set it up and configure it, but dang it if it isn't a frustrating process.
Any tips would be much appreciated.