newbie questions ...
I am a ex slicehoster, about to setup my first linnode using Ubuntu and have a couple of questions.
I am a Mac / Windows user with BASIC linux skills (I learned from reading tutorials on Slicehost!)
Perviously I had a simple LAMP install, and was not doing anything special. However this time I would really like to do a bit more.
- Apache
I have a basic site, flat HTML. Maybe install PHP, Ruby as well.
- Wordpress
If Apache is also on port 80, can you install Wordpress also on port 80 and use apache as the web server and then use virtual hosts so
- FTP Server
The is one big things I want to sort out but have a easy way to setup accounts rather than SSH etc and so would prefer web browser control. Would using WebMin be the best option for that ? Should I use the default FTP server in Ubuntu or download one of the third party ones. Also is there any web interfaces that allow users to upload via a webpage rather than having a FTP client ? for my work I have clients / suppliers who upload / download stuff but not always that technical.
- VPN
I would like to setup a VPN so I can connect to my server from the UK, and then get to US websites that are blocked in UK (such as Hulu etc). Thinking OpenVPN is the best option or is there an easier way, OpenVPN looks like a real beast!
- Confluemce / JIRA
I was also thinking about installing JIRA and Confluence, any one have experience of minimum spec Linnode they would use for this. Requires Java which is a memory HOG!
Thanks for any advice in advance
2 Replies
Wordpress is a php web site. You would need to install apache (looks like you already have) and php. Once you configure apache and the vhost, apache will ask php to load Wordpress and will send what php loads to whoever is trying to access your Wordpress site.
It is possible to have a vhost in apache for your two different domains. It's not that hard once you know the basics. You would put it in apache's config directory. The config directory will normally be /etc/httpd, /etc/apache, or /etc/apache2, depending on your distribution. The vhosts directory would be inside your apache config directory. The vhosts directory will normally be called either sites-available or vhosts.
Here is a sample vhosts file to get you started, modify as needed:
<virtualhost 000.000.000.000:80="">ServerName yyy.com
ServerAlias www.yyy.com
DocumentRoot /srv/www/yyy.com/html
ErrorLog /srv/www/yyy.com/logs/error_log
CustomLog /srv/www/yyy.com/logs/access_log combined</virtualhost>
Replace 000.000.000.000 with the public IP of your server. This will tell apache to expose the vhost to the Internet using that IP. The :80 (colon 80) is the network port that your vhost will be accessible through. You can change the port to whatever, but port 80 is the default port for normal web browsing, and 443 for secure web browsing. Unless you have a couple hundred dollars to pay to a company like VeriSign for a security certificate, I recommend sticking to port 80. If you do your own self-signed certificate and people visit your site, their browser will give them a warning about it, and they'll get scared.
The ServerName should be the domain name of your web site. This is what Apache will watch for to load your site.
You can have several server aliases, and they must be either domains or subdomains that are attached to your web server. You can have each on it's own ServerAlias line, or put them in the same ServerAlias and separate by spaces.
The DocumentRoot is where you put the files for yyy.com, and can be anywhere, though /srv/www/(yoursitename)/html seems to be standard to most setups.
ErrorLog and CustomLog can be anywhere, though I recommend keeping them in /srv/www/(yoursitename)/logs, or wherever (yoursitename) is, but separate from your html directory – if you put the logs in the html directory, apache will allow people to access them, and this can be a big security hazard. errorlog and accesslog are the names of the logs, you can change these, but make the names obvious what they are.
Put each vhost file in your apache's vhosts directory (vhosts or sites-available). If it uses sites-available, you will need to create a symlink in apache's sites-enabled. A symlink is also called a softlink and is roughly equivalent to a shortcut in Windows.
The command to symlink:
ln -s /etc/apache/sites-available/yyy.com /etc/apache/sites-enabled/yyy.com
ln (the first letter is the letter EL) is the command for creating links. -s tells it to make a softlink (this is different from a hardlink). The first file, /etc/apache/sites-available/yyy.com, is what your shortcut will point to. The second file, /etc/apache/sites-enabled/yyy.com, is the actual link.
If you don't uses sites-enabled and sites-available, but instead use something like /etc/apache/vhosts, you will need to locate the apache configuration file (usually called apache.conf, apache2.conf, or httpd.conf) and add the following at the bottom:
#Virtual hosts
Include /etc/apache/vhosts/yyy.com
Include /etc/apache/vhosts/www.com
Replace /etc/apache/vhosts with the correct directory if needed. You can either put each vhost on it's own Include line, or to include all of them at once on one line, you can replace
Before you start apache, you will need to create the directories listed in your vhosts files for DirectoryRoot, ErrorLog, and CustomLog. You should also put your site into the DirectoryRoot, this is where apache will load your web site from.
You will need to look in your apache config for User and Group. Your DirectoryRoot, ErrorLog, and CustomLog must be owned by this user and group. You can change what Apache specifies, but that user and group must exist, and should be a user and group that will never be used for anything else. This is to make your web server more secure.
Once you find out what Apache says for the user and group, you need to run the following commands:
chown -R user /path/to/directory/root
chown user /path/to/custom/log
chown user /path/to/error/log
chgrp -R group /path/to/directory/root
chgrp group /path/to/custom/log
chgrp group /path/to/error/log
Replace user and group with the ones specified in the apache config file, and replace the paths in the above commands with the DirectoryRoot, ErrorLog, and CustomLog directories.
That's about all I can offer.
@woodyuk:
I would like to setup a VPN so I can connect to my server from the UK, and then get to US websites that are blocked in UK (such as Hulu etc). Thinking OpenVPN is the best option or is there an easier way, OpenVPN looks like a real beast!
OpenVPN is the best option for VPN, but the simpler way would be to open a SSH tunnel and proxy your browser through that. It's a simple matter on either Windows or Mac.
I would advise against an FTP server or Webmin for basic administration, as that can add a lot of needless complexity. All you need is SSH, with which you can connect securely via any FTP client over sftp or scp.