Can't secure hostbill installation (moving templates_c folders)

Started by zero0097, September 04, 2013, 08:26:34 PM

zero0097

Hi, I've a clean installation of hostbill, I'm following the setup/security guide at (http://wiki.hostbillapp.com/index.php?title=Additional_security_steps)...

I've moved the templates_c, attachments and downloads folder outside the public_html (secure_hostbill folder), and I've already edited the config.php file to point to those directories, the directories have 777 permission, and are owned by the server user (www-data)..

But when I go to the browser (admin login area), I got:
Uh oh! Something went wrong ...
PHP [User Error]: Smarty error: the $compile_dir '/var/zpanel/hostdata/user/secure_hostbill/templates_c/' does not exist, or is not a directory. IN includes/libs/smarty/Smarty.class.php(1101)


The directory exists, I can access to it by copying and pasting that given path in a shell..
The specified line in that file only throws that error, but I can't see where it's called.

This is my config.php:

//Absolute location of templates_c dir - leave false for default
$hb_templates_c_dir = "/var/zpanel/hostdata/user/secure_hostbill/templates_c";

//Absolute location of attachments dir - leave false for default
$hb_attachments_dir = "/var/zpanel/hostdata/user/secure_hostbill/attachments";

//Absolute location of downlods dir - leave false for default
$hb_downloads_dir = "/var/zpanel/hostdata/user/secure_hostbill/downloads";



Please help =(

Thanks in advance!! ;D

tallship

Smarty error? hm...

have you HUP'd your httpd? (perhaps /etc/rc.d/httpd restart or something like that, depending upon your distro). Dunno if that's actually going to make a difference but it could be good measure just the same.

http://wiki.hostbillapp.com/index.php?title=Additional_security_steps is indeed the correct steps, but let me ask, What is the path to your public_html (DocumentRoot) directory? i.e., is the username of your hostbill installation 'user'? If so, then yes those dirs should be fine I think.

So, if
/var/zpanel/hostdata/hostbill/public_html/templates_c was where they were, then
/var/zpanel/hostdata/hostbill/secure_hostbill/templates_c should work.

did you do a:


# chmod -Rv 777 /var/zpanel/hostdata/hostbill/secure_hostbill/templates_c
# chmod -Rv 777 /var/zpanel/hostdata/hostbill/secure_hostbill/attachments
# chmod -Rv 777 /var/zpanel/hostdata/hostbill/secure_hostbill/downloads


or a


# chmod -Rv 777 /var/zpanel/hostdata/hostbill/secure_hostbill


Let us know when you find the fix k?

Bradley D. Thornton - Manager Network Services, NorthTech Computer   TEL: +1.310.388.9469 (US) | +44.203.318.2755 (UK) | +61.390.088.072 (AU) | +41.43.508.05.10 (CH)
Registered Linux User #190795 - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

Vanse

I had no problem moving these directories,

you might check this way:

You can log into you account at hostbillapp.com and check your license, it will tell you the directory hostbill thinks it is installed in and then you can modify your path relative to that.

I just created a directory above public_html, put them there and then pasted in the path from my license data(with the required changes of course).

Hope this helps,
-Vanse


zero0097

Thanks for your answers guys, I was keeping my secure_hostbill folder 2 dirs up from the actual public folder, but I've tried all the ideas you gave me (1 dir up, without secure_hostbill folder, reusing those commands for chmod, using the path in my license, etc), but I get the same error page, and in all cases the path and permissions were corrects...

While trying to restart the apache I have this:

[....] Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using xyz.admon.hostbill.com for ServerName
[Fri Sep 06 19:28:42 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using xyz.admon.hostbill.com for ServerName
[Fri Sep 06 19:28:43 2013] [warn] NameVirtualHost *:80 has no VirtualHosts
. ok


Could be the problem related to that?, now Vanse said something about using the path in my hostbill license, and I'm using it already, but I think there's something wrong with domain, may be you can say me if its true.

I've zPanel installed, I've create a user in zPanel for hostbill, and my complete publich_html path is: /var/zpanel/hostdata/hbuser/public_html/admon_hostbill_com
all that path is created by zPanel even the last folder "admon_hostbill_com", what is related to my domain (admon.hostbill.com) configured in my zPanel account, (supose) I can view my hostbill home page requesting that domain.

But actually my zPanel is using another domain, xyz.admon.hostbill.com, my server is accessible requesting that domain, which domain I need to specify in my license details? the global one or the used only for hostbill? all of that is in the same server (same IP).

Thanks for your help  :)

PD: I've been using sample info for my problem, I've no permission to reveal domains, accounts and all of that, boss orders  :-X

Enterprisevpssolutions

It sounds like your dns is not setup correctly and you have to setup your hostname on the system.

To solve this problem You need set ServerName.

vim /etc/apache2/conf.d/name

For example set add ServerName localhost or any other name:

ServerName localhost

Restart Apache 2

service apache restart
Enterprise Vps Solutions (VPS) - Cloud Solutions, Shared hosting, VPS , and more, Fast Dedicated Servers. Great ssl prices SSL Certs, Follow us on Twitter. Sales Question? Contact us! Send us a Request Tampa , Florida Hivelocity Datacenter

zero0097

For the record... I didn't solve the problem, I think that was more zPanel related problem... I just stopped using zPanel.. Cheers  :)

tallship

Perhaps this will help. You prolly shouldn't install a top-level app like Hostbill that controls hosting panels inside a hosting panel.


http://wiki.hostbillapp.com/index.php?title=Installing:Linux_Manual
Bradley D. Thornton - Manager Network Services, NorthTech Computer   TEL: +1.310.388.9469 (US) | +44.203.318.2755 (UK) | +61.390.088.072 (AU) | +41.43.508.05.10 (CH)
Registered Linux User #190795 - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.