Submitted by Ksho on Mon, 12/26/2016 - 14:45
Hi Hope you guys had a good holiday!
Quick question, when I create a virtual server a database is created automatically, need for the lamp stack to run I assume.
Does a fresh install of wordpress use the same database in the virtual server directory? Or should I be creating a new one?
I see when I do the auto install a new database is created, but in what directory?
For example I have a sub domain called serv.kaisho.work. When it's created a new database is created.
When wordpress installs on that sub directory, where does it go? To the root of serv (the sub dmain) or to root of the wordpress folder under serv?
I don't see any means to create the username and database host - these are missing.
Thanks
Status:
Active
Comments
Submitted by Ksho on Mon, 12/26/2016 - 15:31 Comment #1
Also, when I create a database manually, I don't see the database appear in virtual min sub directory. Hmmmm. I know it's listed because I see it in the mysql command.
Thanks
Submitted by JamieCameron on Mon, 12/26/2016 - 15:58 Comment #2
Databases aren't stored under the domain's home directory at all - MySQL puts them under /var/lib/mysql or something similar, depending on the OS.
Submitted by Ksho on Mon, 12/26/2016 - 16:34 Comment #3
Right ok, thanks. I see them in var/lib/mysql
I see now I have to go into Webmin to see all the databases in VirtualMin. Showed up.
Thanks for the tip.
Submitted by Ksho on Tue, 12/27/2016 - 08:33 Comment #4
What I am doing before going to live site is making sure commands I place through Linux shell (putty) are picked up by VirtualMin.
I created a new user when logged into putty as root, but when I go to webmin or vmin and check them I don't see them.
The command I use is simply:
adduser kevin
adduser kevin sudo
Shouldn't "kevin" show up in the virtual directory I created as a user? Thanks
Submitted by andreychek on Tue, 12/27/2016 - 09:20 Comment #5
You can see your databases from within Virtualmin, you shouldn't need to interact with them in Webmin (in general, you usually don't need to use Webmin to do most normal activities).
In Virtualmin as your Virtual Server owner, you can review your databases in the Edit Databases menu.
Regarding creating a user -- if you create it outside of Virtualmin, Virtualmin won't know about it, and that user won't be associated with any given domain in Virtualmin.
If you want to create a new user, and have that user associated with a domain in Virtualmin, what you can do is log into Virtualmin, click Edit Users, and from there you can create a new user.
Submitted by Ksho on Tue, 12/27/2016 - 10:14 Comment #6
Thanks for this: ........if you create it outside of Virtualmin, Virtualmin won't know about it, and that user won't be associated with any given domain in Virtualmin....
I just couldn't understand why the user wasn't showing up. I went in to root and listed all users, there are many that ubuntu adds on install that aren't in vmin, now makes sense.
Thanks.
Submitted by Ksho on Tue, 12/27/2016 - 12:50 Comment #7
BTW - I am trying to do a manual install on WP and the following error keeps coming up:
Not Found
The requested URL /WP/wordpress/ was not found on this server.
Apache/2.4.18 (Ubuntu) Server at titan.kaisho.work Port 80
Any ideas?
I'd really like to know I can install a custom WP module rather than just the autoinstall.
THanks
btw, I am using Linode server and following this article. - very simple steps. https://www.linode.com/docs/websites/cms/install-wordpress-on-ubuntu-16-04
thanks
Submitted by andreychek on Tue, 12/27/2016 - 13:51 Comment #8
To install WordPress in Virtualmin Pro, it should just be a matter of going into the Install Scripts area, choosing "WordPress" to install, and then selecting the path.
You can also have it create a new database for you if you like, while it's adding that.
Is that what you had tried, when you received the error in comment #7 above?
Or had you been using the Linode documentation you shared?
Submitted by Ksho on Tue, 12/27/2016 - 15:14 Comment #9
Hi No, I followed the Linode documentation after installing the Vmin GPL to see if I could install WP manually. I just like to know I can do it/it can be done - but there is that permission error.
I honestly thought it be a simple process - after 20 attempts I'm at a loss really. I looked at Vmin documentation - there is no WP install manual guide.
Thanks.
Submitted by andreychek on Tue, 12/27/2016 - 15:44 Comment #10
Hmm, I'm a little confused as to what issue you're seeing at the moment, along with how PHP was installed.
But perhaps we could back up, and start again?
We can only really provide assistance with installing WordPress using the automated Install Scripts, installing that manually isn't something we'd be able to assist with.
But we do have an automated way of installing WordPress.
To use that, you'd need to have Virtualmin Pro installed.
If that's installed, you can then use the automated WordPress installation by going into the Install Scripts menu, and selecting WordPress.
Can you let us know what happens when trying that?
Submitted by Ksho on Tue, 12/27/2016 - 16:53 Comment #11
Sorry about the confusion. I have Pro installed, (works fine) but I wanted to try the GPL as well to see if I could install manually. I just always beleive in having a backup in case say Pro had a bug, or your website went down or Vmin was bought out by a big company, etc. These things happen so is a way to ensure I could install sites in any eventuality.
I will try the manual install using wordpress.org rather than linode and see if that works.
Again, sorry for the confusion. Thanks.
Submitted by Ksho on Tue, 12/27/2016 - 17:39 Comment #12
I installed from the WP site, mostly ok, but the page renders PHP.
Also an error found php-7.0 fpi wasn't even installed. I did a general install of Vmin GPL.
I've never seen this - is there something that is missing in the GPL version? So strange.
thanks.
Submitted by andreychek on Tue, 12/27/2016 - 18:04 Comment #13
Websites in Virtualmin Pro and GPL should each function the same.
Can you show us a URL that's exhibiting the problem you're describing?
Submitted by Ksho on Tue, 12/27/2016 - 18:10 Comment #14
Thanks Here is the proof Vmin is working correctly on the install: http://chosem.work/
But here is the wordpress install with the php displayed: http://chosem.work/wordpress/
Thanks.
Submitted by andreychek on Tue, 12/27/2016 - 18:58 Comment #15
Hmm, that doesn't actually appear to be what I'd expect to see from one of your Virtual Servers.
What is the home directory for that particular domain?
That looks like Ubuntu's default site in /var/www, rather than your various Virtual Servers located in /home/USERNAME/public_html.
Submitted by Ksho on Tue, 12/27/2016 - 20:22 Comment #16
Hi I'm new to the terminology - but chosem.work is the main domain, not the virtual server.
I have a new subdomain (virtual server) called http://titan.chosem.work/ and that is showing ubuntu page.
Was I to create a new virtual server called chosem.work?
BTW I'm a subscriber to Vmin Pro but in fairness going to have to send a small fee for your advice. Can discuss later.
Thanks
Submitted by andreychek on Tue, 12/27/2016 - 23:26 Comment #17
Hmm, it looks like chosem.work is showing the same issue as titan.chosem.work.
I would suggest running these two commands:
a2dismod 000-default
service apache2 restart
Once you do that, are you able to access /wordpress/ on your domain?
If not, what is the output of these commands:
grep -i '<virtualhost' /etc/apache2/sites-enabled/*.conf
ifconfig
Submitted by Ksho on Wed, 12/28/2016 - 07:36 Comment #18
Hi
The first command didn't work so I found these and entered them: cd /etc/apache2/sites-available/ a2dissite 000-default.conf service apache2 reload
when I visit chosem.work Error is:
Forbidden
You don't have permission to access / on this server. Apache/2.4.18 (Ubuntu) Server at chosem.work Port 443
Honestly should I scrub the server and start again. Maybe I should list the exact steps I am taking - on a posting, (but it's all pretty basic).
There result for the first command is:: /etc/apache2/sites-enabled/titan.chosem.work.conf:
/etc/apache2/sites-enabled/titan.chosem.work.conf:
/etc/apache2/sites-enabled/wpress.chosem.work.conf:
/etc/apache2/sites-enabled/wpress.chosem.work.conf:
The result for the second is: eth0 Link encap:Ethernet HWaddr f2:3c:91:59:d4:8f
lo Link encap:Local Loopback
Maybe I should try on Digital Ocean and see what the result is there.
I sense I am the only one with these issues - I don't see any others posting similar - just don;t know. Thanks
Submitted by andreychek on Wed, 12/28/2016 - 11:06 Comment #19
Oh nuts, sorry about that the command I gave you was for disabling mods, rather than disabling sites. You got the command correct though! That's exactly what I was after.
It sounds like you're on the right track -- that forbidden error is what I'd expect to see, until a website is uploaded into the public_html folder.
You mentioned that you had a WordPress installation -- what happens if you try to access that?
Submitted by Ksho on Wed, 12/28/2016 - 11:24 Comment #20
No problem.
I uploaded an index.html page and it renders it. Fine on chosem.work.
For the wordpress (in the directory /var/www/html/wordpress, site the error is :
Not Found
The requested URL /wordpress/readme.html was not found on this server.
Apache/2.4.18 (Ubuntu) Server at chosem.work Port 80
Idea: Should I try installing wordpress in a virtual server directory? Right now I am placing it the /var/www/html directory which is the general directory for Linode. Or does Virtualmin override the VPS main directory with it's own home/ domain/public_html directory??
Thanks for the help.
Submitted by andreychek on Wed, 12/28/2016 - 11:28 Comment #21
Yeah once you've installed Virtualmin, I'd always try to interact with websites using it.
That is, I'd always try to create Virtual Servers for my domains, and put the website content within a Virtual Server.
You can still manually install WordPress if that's your wish, or you could automatically install it using an Install Script.
But what I'm recommending is that WordPress be put into a Virtual Server directory such as /home/USERNAME/public_html/wordpress.
Let us know how that goes!
Submitted by Ksho on Wed, 12/28/2016 - 12:18 Comment #22
Hi
"Username" is the name of the Virtual Server I created? is that correct? Thanks
Update: Ok, now got to the Install page - it renders in the virtual server. wpress.chosem.work/wordpress
Only issue is it's not connecting to the database.
I see in Vmin it only has one database. Do I need to create a new database under the wpress virtual server? If so, there is no field for password or username, only name of database.
Doesn't Wordpress if it's in a virtual server read all the databases?
Thanks!
Submitted by andreychek on Wed, 12/28/2016 - 12:33 Comment #23
The "USERNAME" is the name of your Virtual Server owner.
You can determine that by going into Edit Virtual Server, and looking at the Administration Username field.
The database user for that domain will only be able to see databases belonging to that particular Virtual Server. If you're installing WordPress using the Install Scripts, you can have that create a new domain for you.
And if you're installing WordPress manually, you can create a new domain first by going into the Edit Databases link and creating it there.
Submitted by Ksho on Wed, 12/28/2016 - 12:51 Comment #24
Can you believe it worked?
All the effort paid off - thank you.
The only thing is WP couldn't create the config file so it spit out some code and I had to upload that.
I will document what I did and send to you so you can maybe use it as a post if you request - might help a really new person.
I guess there is no need though to create a database using the mysql prompts through root if that database isn't used - is there a way to create the database only for the virtual file manually? Just a curiosity.
Thanks
Submitted by andreychek on Wed, 12/28/2016 - 13:10 Comment #25
Glad to hear it's working!
You'd generally want to create databases from within Virtualmin (using Edit Databases), otherwise the Virtual Server owner wouldn't have permissions to access it.
Technically, you can create a database outside of Virtualmin, and manually grant it rights for the database owner to access it, but that's not something we recommend.
Submitted by Ksho on Wed, 12/28/2016 - 13:21 Comment #26
Hi Thanks, Yeah, this was the reason for the database error. It couldn't find it and didn't have permissions. Will document what I did, hope it works.
Thanks again.
Submitted by Ksho on Wed, 12/28/2016 - 14:19 Comment #27
ok, so close but small hiccup.
Error Unable to create directory wp-content/uploads/2016/12. Is its parent directory writable by the server?
I found fixes but none relating to uploading a theme - it won't activate? Is there a simple fix you might know of?
Thanks
Submitted by andreychek on Wed, 12/28/2016 - 14:35 Comment #28
Is this a manually installed WordPress install, or did you install it via the Install Scripts?
If you installed it manually, there could be some issues with file permissions that would be handled for you with the automatic Install Scripts.
Submitted by Ksho on Wed, 12/28/2016 - 15:25 Comment #29
No, I mentioned above we are trying both manual and automated install. It seems odd to not to be able to do both. We have both Pro an GPL.
You wrote this awhile back, so was trying to replicate it. Codex install should work but it doesn't, at least for us, as the database creation with mysql doesn't work, only virtualmin database creation works. I don't know how that fellow got it to work. https://www.virtualmin.com/node/19157
Thanks
Submitted by andreychek on Wed, 12/28/2016 - 16:06 Comment #30
Could you add a test.php script to this particular domain's public_html folder, and in that file, give it the following contents:
<?php phpinfo(); ?>
Then, can you share a link to that test.php script for us?
Submitted by Ksho on Wed, 12/28/2016 - 23:34 Comment #31
Hi I've been scrubbing and reloading installs. Still the same.
Here is the test.php file.
http://wpress.chosem.work/test.php
If it matters the only command line code that was different was : chown -R www-data:www-data /home/wpress/wp
Not sure if that impacts the persmissions.
Thanks.
Submitted by andreychek on Thu, 12/29/2016 - 09:41 Comment #32
Okay, can we start with a fresh WordPress install, done via the Virtualmin Install Scripts, and then troubleshoot that?
Here's what I'm after --
Do a fresh install, and then once that's done, let us know the exact error you're seeing (perhaps it's the same error as above, but I'd like to be sure).
Once that's done, what we'll have you do is run some commands to get the directory and file permissions of the files/folders that are involved in the error.
Submitted by Ksho on Thu, 12/29/2016 - 10:02 Comment #33
Hi I have solved half of the problem. I created the uploads folder and gave it permission of 777 and uploading an image now works.
The second half is now when uploading a theme, it keeps asking for ftp file information, which it shouldn't. Again this is a permission problem.
Quick aside, the issues are not with the WP install script, it is with the GPL - installing standalone. I don't get the discrepancy.
Nevertheless, looks like this final ftp issue is the remaining one left. Maybe you know of a quick fix. Thanks.
Submitted by andreychek on Thu, 12/29/2016 - 10:41 Comment #34
With an automated install, Virtualmin ensures that everything is setup with the right username and permissions.
With a manual install using Virtualmin GPL, that wouldn't necessarily be the case.
What you could always try, is to go into Limits and Validation -> Validate Virtual Servers -> Fix Permissions, and there, have it fix the permissions for the domain that you're experiencing problems with, and see if that helps.