# Website and Forum on Linux VPS



## FliP (Aug 8, 2015)

Hello vpsboard community.

I'm the owner of a small VPS I use to host a TeamSpeak Server for my Guild. I still have enough Bandwidth and Resources left on it so I would like to create and host a website and forum on it, as well as adding a custom domain.

I did read some tutorials on how to create a website and how to create a forum, but I have no idea how to do all of that combined into 1 single website.

What I had in mind was something like www.website.com and www.website.com/forum

Could anyone help me out or point me in the right direction?
Thank you advance for your help.


----------



## MannDude (Aug 8, 2015)

What Linux OS are you running?

First things first, you'll need to make sure a webserver is installed on the VPS like Apache or Nginx. You're also going to need to install MySQL and PHP for the forum as well. You can google, "[LAMP/LEMP] stack [CentOS/Debian/Ubuntu]", just be sure to choose either LAMP (apache) or LEMP (nginx, the 'e' is for how nginx is pronouced: engine-x, instead of using an 'n') and choose your OS. You can pretty much just copy/paste the commands into your VPS via SSH to get setup. If you encounter any errors, let us know.


----------



## FliP (Aug 8, 2015)

The Linux is Ubuntu 14.04 64bit.

Website should be easy, but what is confusing me is how to install the forum software and manually set domains and urls.


----------



## MikeA (Aug 8, 2015)

> The Linux is Ubuntu 14.04 64bit.
> 
> Website should be easy, but what is confusing me is how to install the forum software and manually set domains and urls.



If you just want something quick with a single domain just point your root domain to your VPS IP and upload your forum scripts to /var/www/html (Apache default web directory). Linode has a well put together guide below.

https://www.linode.com/docs/websites/lamp/how-to-install-a-lamp-stack-on-ubuntu-14-04


----------



## drmike (Aug 8, 2015)

Just be sure to pick one of the popular open source forum software packages 

cPanel is a good tool to have / pay for if you aren't technical enough to glue the software mess together.   Multiple open source forum packages in there.


----------



## FliP (Aug 11, 2015)

I got some spare time today so I decided to get to it.

Apache is installed and works. MySQL is causing me trouble. No matter what I try (and I tried all I could find on the internet), it wont set a new MySQL Root Password.

No matter what I try, I always get stuck on:

"Unable to set password for the MySQL "root" user                           x
x                                                                            x
x An error occurred while setting the password for the MySQL                 x
x administrative user. This may have happened because the account already    x
x has a password, or because of a communication problem with the MySQL       x
x server.                                                                    x
x                                                                            x
x You should check the account's password after the package installation.    x
x                                                                            x
x Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for     x
x more information.                                        "

With the following messages:

"

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libhtml-template-perl (2.95-1) ...
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Setting up php5-common (5.5.9+dfsg-1ubuntu4.11) ...

Creating config file /etc/php5/mods-available/pdo.ini with new version

Creating config file /etc/php5/mods-available/opcache.ini with new version
Setting up php5-mysql (5.5.9+dfsg-1ubuntu4.11) ...

Creating config file /etc/php5/mods-available/mysql.ini with new version

Creating config file /etc/php5/mods-available/mysqli.ini with new version

Creating config file /etc/php5/mods-available/pdo_mysql.ini with new version
Setting up php5-json (1.3.2-2build1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:/root$ Unable to set password for the MySQL "root" user    "


----------



## HalfEatenPie (Aug 11, 2015)

Honestly...  just make life easier.

Reinstall Ubuntu/Debian (since they prefer a clean installation before you do anything else).  Install VestaCP.  Put the Teamspeak server back on it.  

Go into the VestaCP control panel and do everything you need to do there.  

Live life and realize how much easier you just made everything. 

Warning: If course since you're basically automating everything if apache or nginx or MySQL mess up you won't know what the first steps are to fixing it (if you go with that tutorial you can probably slowly figure it out but it'd still take some outside help).  

VestaCP (since it's adding on another layer of software on top of just running the barebones webserver + Database) can provide an additional "point of failure" (especially if someone is able to get into your admin account on it).  However VestaCP will help you with configuration and server management.  It's probably one of the easiest ways of doing it and you can easily add on another site if you want to.  

Good luck and have fun.


----------



## FliP (Aug 11, 2015)

I'd re-install it, but is there a way to avoid that if possible?

Or at least to completely backup my TeamSpeak, since it didnt work when I tried it once.


----------



## HalfEatenPie (Aug 11, 2015)

Yep.

Just move the folder with your teamspeak server to another place or download it as a zip or something.

Everything your teamspeak server needs is in there.  I had to migrate our teamspeak server from one server to another and just moved the folder back. 

However, since I'm pretty sure you want to actually get more detail on this rather than some random guy on a forum, I'd like to redirect you to this Support Document from Teamspeak directly on what you need to move your teamspeak server from one server to another: https://support.teamspeakusa.com/index.php?/Knowledgebase/Article/View/315/16/i-want-to-move-my-server-to-another-machine-which-files-should-i-copy


----------



## FliP (Aug 11, 2015)

Well, that's exactly what I did once, but I ended up with no channels etc.

But reading the link you posted I may have missed the ts3server.sqlitedb.

I'd like to only re-install Ubuntu as last resort and if nothing else can be done. Aren't there any commands to completely remove all traces of Apache and Mysql so I can try fresh? I could even remove the required directories and files manually.


----------



## HalfEatenPie (Aug 11, 2015)

Stop the services.

Remove those services (I think apt-get --purge remove apache2 mysql-server is the line you want?).  

Wouldn't hurt to restart the server anyways.

IIRC the VestaCP script is pretty forgiving, so who knows it might work perfectly.  Just sometimes there is that odd package that was installed that screws with something.  Mostly it's just to avoid these kinds of potential headache.

Oh and also as a word of advice, backup anything and everything before you mess with it.  I don't see how this would even be an issue but there could potentially be a conflicting problem with running the teamspeak server on top of VestaCP (more than likely this will never be a problem but doesn't hurt to be prepared).  So...  Yeah back everything up before you go around screwing with it.


----------



## FliP (Aug 11, 2015)

Managed to get it working by completely removing mysql per command and manually deleting everything associated to mysql.

I got LAMP installed now and my domain works too.

Kinda offtopic, but does anyone know a decent, noob friendly (no HTML or PHP knowledge) tool to create html websites?


----------



## souen (Aug 11, 2015)

There's Raptor Editor (haven't tried it). KompoZer hasn't been actively developed for some time, but for quick static pages it'll do the job.

If you don't want to touch HTML at all, you could also consider installing some kind of light blog or CMS that has a collection of themes, pick one and done.


----------



## FliP (Aug 11, 2015)

Leaving the homepage for later. I decided to get my vb on it.

After a fresh install, it looks like this: http://i.imgur.com/TUgHcZJ.png

Again, the internet was of no use to solve this problem.


----------



## HalfEatenPie (Aug 11, 2015)

Looks like your CSS isn't loading. 

I'm willing to suspect it's a permission issue or your uploaded file is broken, but not too sure since this can be many factors involved.  

Try reuploading and reinstalling vBulletin.  As a note and PSA you should only be using a legal paid version of vBulletin.  Never used the "cracked" or "nulled" versions ever.  Most of them contain backdoors and other vulnerabilities that you just don't want to deal with.  Not saying I'm accusing you of using a nulled software, just in general working with legit paid software will save you a ton of headaches down the road.


----------



## FliP (Aug 11, 2015)

It looks to me that the forum file location is set wrong in the config, even though I did as described in multiple tutorials and checked my config files countless times for stuff I may have missed.

It seems like it is loading the index, but no images and no links are working. So I'm assuming it must be a directory configuration problem.

The Forum is located in var/www/html/mywebsite/public_html/forum and that seems to be fine since I installed it that way.

A common problem is that the admincp cannot be accessed as it should be accessed through website.com/admincp, instead I have to access it through forum/core/admincp so that already indicated that something is wrong.

My root config.php core setting is default



Spoiler



// Assumes default location of core. 
// These are the system paths and folders for your vBulletin files
// This setting is for where your vbulletin core folder is
$config['core_path'] = realpath(dirname(__FILE__)) . '/core';

$config['php_sessions'] = false;


and the config.php located in core/includes has the following setting



Spoiler



$config['Misc']['forumpath'] = '/var/www/html/mywebsite/public_html/forum';


I tried to play around with this setting, but nothing worked.


----------



## HalfEatenPie (Aug 11, 2015)

Sorry but we're not a vBulletin support forum.  And I mean that as in you're probably going to have more luck asking on a forum focused on vBulletin installation.  I personally am not too familiar with vBulletin so I can't help you with that.


----------



## FliP (Aug 11, 2015)

Sorry, I thought maybe someone has some experience regarding forum software.

I'll just try another forum software since the VB License was my roommates anyway.


----------



## qrwteyrutiyoup (Aug 11, 2015)

If you have enough resources, take a look at discourse. 

https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md


----------



## HalfEatenPie (Aug 11, 2015)

FliP said:


> Sorry, I thought maybe someone has some experience regarding forum software.
> 
> I'll just try another forum software since the VB License was my roommates anyway.



Oh not a problem.  I'd love to have helped out in it but I never had to install and manage a community with vBulletin.  



qrwteyrutiyoup said:


> If you have enough resources, take a look at discourse. https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md



iirc Discourse is very javascript heavy.  This is still true right?  I remember when for a long time their "Anti Spam" process was "We use Javascript.  Bots can't read javascript.  #winning".  Besides that they don't really have any good anti-spam system in place.


----------



## XiNiX (Aug 12, 2015)

> Sorry, I thought maybe someone has some experience regarding forum software.
> 
> I'll just try another forum software since the VB License was my roommates anyway.



Well,

Firstly I advise you to take a backup of the server before you start any experiments/setups. You never know when things might go wrong.

Secondly, You can install VestaCP to manage your VPS. This will eaisily ad your domain manage DNS , Files etc. Plus it includes an excellent firewall for security.

Thirdly, for forum, you can try : MyBB ,  PHPBB or Vanilla as FREE Options. If you wanna go for a commercial product, i would advise you to go for XenForo.

Regards,

Alex.


----------



## qrwteyrutiyoup (Aug 12, 2015)

HalfEatenPie said:


> FliP said:
> 
> 
> > iirc Discourse is very javascript heavy.  This is still true right?  I remember when for a long time their "Anti Spam" process was "We use Javascript.  Bots can't read javascript.  #winning".  Besides that they don't really have any good anti-spam system in place.


I suppose so, in terms of javscript. As for their Anti-Spam process, I saw [1] they now support Akismet through a plugin, not sure about other measures they have in place. I just run two very small boards, so I am yet to have issues with spam 

I like using Discourse, it makes for a nice user experience, IMO. What I dislike is that it requires quite some resources and it also takes a while to rebuild the forum during an update. As I said, I just run two small boards, so I haven't really had much problems with spam/moderation/etc. So far so good, and the users seem to like it as well.

[1] https://meta.discourse.org/t/isp-based-anti-spam-countermeasures/20082/12


----------



## FliP (Aug 12, 2015)

I installed a Vanilla Forum since it was very easy to install.

Forum is up and running properly. The next problem I am facing is on my homepage and I guess I'll just mention it since I'm typing this post anyway.

It is nothing VPS related, it's about HTML.

Here is a picture that shows what I have currently: Link

As shown in link, I have a border image (transparent) and a embedded video. What I want to do is to place the video inside the image (in the transparent area) or overlay the image over the video.

There are some posts on the internet that show how to do it, but with the image dissapearing while the video plays. I need the image to stay.


----------



## HalfEatenPie (Aug 12, 2015)

FliP said:


> I installed a Vanilla Forum since it was very easy to install.
> 
> Forum is up and running properly. The next problem I am facing is on my homepage and I guess I'll just mention it since I'm typing this post anyway.
> 
> ...



It's been a while since I was doing my web design phase.  

A long time ago, you can either work by floating the video into/inside the frame (not very good when you're resizing the browser though, as the datum is the top left corner for most floats) or splice the image up and put the youtube image in a table where each part of the table is a piece of the frame (e.g. maybe a 3x3 table with the first and last column being one giant cell, put the video in the middle cell (2,2) and put each image on each side).  As far as I can tell I don't know what you mean the "image disappearing" since I don't think it really should do that.


----------



## souen (Aug 12, 2015)

Not sure if I understood your question, you want to visually put a border around the video? In that case, how about using CSS to assign the video's background to the border image? Something like the second example here: http://dereksemmler.com/2008/07/25/how-to-frame-your-images/ (replace img.imgPop with embed.anotherclassname or iframe.anotherclassname depending on the first tag in the video embed code, adjust the padding to fit)

If, for some reason, you need the border image over the video (as opposed to just visible in the background), try wrapping video and image in div tags, setting the image to float left and give it a z-index of 1. z-index assigns a stack order to elements (higher number puts an element on a higher layer over other elements).


----------

