Jump to content
  • 0

This page isn’t working - HTTP ERROR 500


EMar

Question

Hi,

This is my first attempt at Blesta install, and first time setting up a vps from scratch with LAMP.

I have Apache2 running, PHP 7.0.25-0ubuntu0.16.04.1 (cli) ( NTS ) and MyQSL.

I had a bit of trouble getting MailParse to install so not sure if I have everything installed correctly.
Checked my site with info.php, looks like i have everything else installed and enabled, not 100% sure.

I had a domain name on another server with cpanel access where I created a subdomain: clients.domain.com

Then I went into the DNS zone manager of that main domain and there were 4 records for the subdomain there,
I pointed that to the vps IP where I set up a virtual host for clients.domain.com <- I'm able to access that.

Then I renamed the blesta main directory to services and uploaded that via ftp.
But when I try to visit clients.domain.com/services i get nothing, empty page, even if i use index.php on the end.
I checked to see f mode_rewrite was working, it says it's enabled and running, I don't know a lot about all this terminal stuff.

Here's what's in the htaccess file in the Blesta main directory:
 

########################################################
# package:    minPHP
# filename:   .htaccess
########################################################

# Do not allow direct access to templates
# or an unauthorized backdoor from CE
<Files ~ "blesta2ce.php|\.(pdt)$">
   order deny,allow
   deny from all
</Files>

# Protect against Clickjacking
#Header append X-Frame-Options "SAMEORIGIN"

RewriteEngine on

# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php

RewriteCond %{REQUEST_URI} ^(.*)/install.php$
RewriteRule install.php %1/install/ [R=301,L]
 

I have a feeling I should have go cPanel on my vps but it has nothing only what I added above.

Any help appreciated, it took me a few days to get this far, can't quit now.

Thanks later

Link to comment
Share on other sites

22 answers to this question

Recommended Posts

  • 0

Hi,

No I didn't think of Centos at the time, it wasn't an option when I rented the vps, I went with Ubuntu because it's free.
My intention was to use the vps to host another application, but I decided it would be a good option for my billing setup.
I have a few things using mysql databases, it took me the whole weekend to setup and I don't want to go backwards now.

Went through the requirements, have Ioncube set up already, not sure about mailparse,

I dunno, just want to get this thing up and running now and get to work on it.

Link to comment
Share on other sites

  • 0

I had a look at Apache logs and found a few errors, all the same as this:

cat /var/log/apache2/error.log

/var/www/clients.domain.com/public_html/services/app/app_model.php was encoded by the ionCube Encoder for PHP 5.4 and cannot 
run under PHP 7.0.\n Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0

Should I install an older version of IonCube?

http://blog.ioncube.com/2016/09/15/php-7-ioncube-loaders/

Quote

The new PHP 7 ionCube Loaders will run files produced by the version 9 PHP 5.6 Encoder.

Here's what I have: 

0UQ2kD.jpg

Link to comment
Share on other sites

  • 0

I think I have IonCube loading correctly, with this tutorial: https://www.howtoforge.com/tutorial/how-to-install-ioncube-loader/

root@user:~# php -v
PHP 7.0.25-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.1.1, Copyright (c) 2002-2017, by ionCube Ltd.
    with Zend OPcache v7.0.25-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

Still no luck loading blesta directory

Still seeing all these errors:

cat /var/log/apache2/error.log

/var/www/clients.domain.com/public_html/services/app/app_model.php was encoded by the ionCube Encoder for PHP 5.4 and cannot 
run under PHP 7.0.\n Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0

Link to comment
Share on other sites

  • 0

In the blesta install zip, there is a 'hotfix-php7' and 'hotfix-php71'.  If you read the README.md file it lets you know you must apply the patch if you want to use PHP7.  Snipet below from the readme file:

-----------------
### Note for PHP 7.0 Users
If you are running PHP 7.0, **you must** apply the hotfix from _/hotfix-php7/blesta/_
to _/blesta/_ before uploading files to your web server.
--------------------

I think you can apply the patch after you have already uploaded them but I'm not too sure on that.

@Paul would it not be better now by default to have the PHP7 patch installed and have the hotfix for PHP 5.x ?  I would think PHP7 is becoming more popular than 5

Link to comment
Share on other sites

  • 0

Thanks, I'm not sure if it's corrected, can I clear that /var/log/apache2/error.log
Then service restart apache2 and run cat /var/log/apache2/error.log again?

Well I applied the patch anyway and now when I visit clients.site.com/blesta I get a different warning..

Not Found

The requested URL /blesta/install was not found on this server.

But it's redirecting to /blesta/install, so something is happening there,

Sorry, this is my first time doing a whole web application in a terminal window, no control panel.
I'll just keep throwing out questions like a lunatic until I get this running.
I think maybe I will have other issues because I'm using a subdomain that was setup on another server.
I went into the dnz records for the main domain back on the other server and pointed the subdomain to this vps I installed Blesta on.
So i have virtual hosts set up for one default domain on the vps and also a virtual host for the Besta install at clients.domain.com

I don't have the luxury of cPanel and Softaculous on this vps.

Link to comment
Share on other sites

  • 0

Ok I cleared the /var/log/apache2/error.lol file then restarted apache
Had a look at cat /var/log/apache2/error.log, it looks a bit cleaner now:

root@user:~# cat /var/log/apache2/error.log
Cannot load the ionCube PHP Loader - it was already loaded
Cannot load the ionCube PHP Loader - it was already loaded
Cannot load the ionCube PHP Loader - it was already loaded
Cannot load the ionCube PHP Loader - it was already loaded
[Tue Feb 20 09:22:52.140573 2018] [mpm_prefork:notice] [pid 641] AH00169: caught SIGTERM, shutting down
Cannot load the ionCube PHP Loader - it was already loaded
Cannot load the ionCube PHP Loader - it was already loaded
[Tue Feb 20 09:22:53.307620 2018] [ssl:warn] [pid 912] AH01909: 111.111.111:443:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 20 09:22:53.365827 2018] [ssl:warn] [pid 913] AH01909: 111.111.111:443:0 server certificate does NOT include an ID which matches the server name
[Tue Feb 20 09:22:53.367592 2018] [mpm_prefork:notice] [pid 913] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Tue Feb 20 09:22:53.367620 2018] [core:notice] [pid 913] AH00094: Command line: '/usr/sbin/apache2'
 

Link to comment
Share on other sites

  • 0

I used this guild to set up my two virtual hosts link
Blesta is in var/www/clients.domain.com/public_html 

There's an index.html file in clients.domain.com/public_html which I can access. 
The subdomain clients.domain.com was created on a separate server in cpanel.

Went into the main domain's DNS Zone manager where there were 4 records for the subdomain,
I then pointed those records for clients.domain.com to the IP of the VPS.

Link to comment
Share on other sites

  • 0
8 hours ago, EMar said:

The requested URL /blesta/install was not found on this server.

Do you have mod_rewrite enabled in Apache? If not, you can delete your .htaccess file and access at /blesta/index.php/install assuming that you did upload to a blesta directory. Also, if you've applied the appropriate hotfix files for your version of PHP 7, you may try re-installing Ioncube. I've seen it crash with 500 errors when it wasn't installed correctly.

Link to comment
Share on other sites

  • 0

Yes mod_rewrite is enabled 6beJji.jpg

When I visit clients.domain.com./blesta/ it now redirects me to clients.domain.com./blesta/install, but it says page not found.
If I search php -v it shows Ioncube is enabled SjlYwh.jpg

Used this guide to set up Ioncube.

I set up a MySQL database in the terminal but haven't connected it to Blesta yet,
Uploaded the Blesta folder to var/www/clients/domain.com/public_html

So there's an index.html at var/www/clients/domain.com/public_html which works, link.
and then there's the Blesta directory at var/www/clients/domain.com/public_html link.

If I go to /blesta/install.php I can see a message from Blesta:

Mod rewrite is not enabled, or htaccess is not supported by this server. You must disable pretty URL support in Blesta by removing the .htaccess file.

Link to comment
Share on other sites

  • 0

So I had a look this guide and think it did the job, 
I went to /etc/apache2/apache2.conf and changed "AllowOverrid None" to AllowOverride All. 

<Directory /var/www/>
     Options Indexes FollowSymLinks
     AllowOverride None
     Require all granted
</Directory>

Then sudo service apache2 restart,

Now if I go to clients.domain.com/blesta/ it redirects me to the Bleasta Installer :)

Someone else suggested going to /etc/apache2/sites-enabled/000-default.conf
I was unable to access those directories at /etc/apache2/sites-enabled and sites-available, but think I'm good to go?

Quote

In my case the changing AllowOverride None to AllowOverride All in /etc/apache2/sites-enabled/000-default.conf helped.

Renamed the /blesta/ directory to /services/ so clients.domain.com/services/ now takes me to the Blesta Installer.

Link to comment
Share on other sites

  • 0

The config file (/var/www/clients.domain.com/public_html/services/config/blesta-new.php) and directory (/var/www/clients.domain.com/public_html/services/config/) must be writable by the webserver.

I set those to 755 which wouldn't work, couldn't access the pages, setting permission to 777 worked.

Although I can't get the mailparse or or php7.0-mcrypt to run, used this guilde.

9DMLy4.jpg

Link to comment
Share on other sites

  • 0

Any Blesta directories or files that were not writable, I set them to 777.

Got mcrypt installed, can't get mailparse to work properly after following this guide,
I fixed the mailparse error with this guide, but it's still not running.

If you screw up the mailparse instal, will it install it multiple times?
Could anyone help or check this mailparse module for me?

Link to comment
Share on other sites

  • 0

user@domain:~$ sudo apt-get -y install gcc make autoconf libc-dev pkg-config
[sudo] password for vcad2018:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libc6-dev' instead of 'libc-dev'
autoconf is already the newest version (2.69-9).
gcc is already the newest version (4:5.3.1-1ubuntu1).
make is already the newest version (4.1-6).
pkg-config is already the newest version (0.29.1-0ubuntu1).
libc6-dev is already the newest version (2.23-0ubuntu10).
0 upgraded, 0 newly installed, 0 to remove and 27 not upgraded.
user@domain:g:~$ sudo pecl7.0-sp install --nodeps mailparse
sudo: pecl7.0-sp: command not found

EDIT

I installed Blesta without the Mailparse module and all seems to be working,
Had an issue when creating the admin user account, no token found but that went away.

I'd appreciate it if someone could take a look at my setup just to be sure I have all the recommended requirements.
I'm not sure how I will handle emails yet, or if I can use something else that doesn't require mailparse.
 

Link to comment
Share on other sites

  • 0

I screwed it up. everything was working fine, 
I have webmin installed, then I installed virtualmin and lost access to blesta.

<?php
/* SVN FILE: $Id$ */
/**
 * This file transfers control over to the dispatcher which will invoke the
 * appropriate controller. We also handle any exceptions that were not handled
 * elsewhere in the application, so we can end gracefully.
 *
 * @package       minPHP
 * @version       $Revision$
 * @modifiedby    $LastChangedBy$
 * @lastmodified  $Date$
 */

I rebuilt the whole server with Centos 7 and CWP7 for my control panel.
Maybe I'll have better luck this time.

Link to comment
Share on other sites

  • 0

The error is too generic and does not tell you exact problem. What you need is to find out what is the real issue. If your site is serving a Internal Server Error, this can be caused by a number of things, such as:

  • Errors in .htaccess files
  • Server permission
  • Server timeout
  • Script timeout
  • Or some other Web Server Issues


Normally, a permissions issue on the file (or files) would be one cause of the 500 Internal Server Error. The simple solution is to run chmod 644 on the problem file(s) or chmod 755 on the directories.

$ sudo chmod -R 777 /"your files location"
The best way to debug the error depends upon the server and what’s actually running at the time. Consider some debugging tips to help diagnose and fix common causes of this problem.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...