• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Restore/Update OpenLightSpeed installation docs

goldtom

Chevereto Member
Pro
I was almost finished with my attempted migration of Chev 3.15 on Lightsail with Nginx to Chev 3.20 on EC2 with OpenLiteSpeed (which I figured I'd try since it's the first time I've done a full stack myself on AWS, so why not). I put it down for a couple of days, and now the docs have been updated, and the OLS stack has been removed from the install/upgrade page. I think I can wrap up the server configuration myself, but I did think those instructions were handy nonetheless. Is there a reason that section was removed? I know there were a couple of details that could be more clear, but it seemed like easy improvements.
 

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
Is there a reason that section was removed?
I removed both Ubuntu and OLS guides as methods like cloud-init implemented in the DigitalOcean repo are better for provisioning a new server. The same method is used for Vultr's so for me is way better to follow that kind of provisioning system as it allows more predictable machines.

The other reason is that we don't use OLS so we can't support it, at least not in the official docs as it is understood that everything in the docs is official stuff maintained by us.

Beauty of git is that you can access the old guide here.

By the way, I still have to-do the AMI for EC2.
 

goldtom

Chevereto Member
Pro
Right on. Incidentally, I did get it working today on OLS running on a standard EC2 AMI. Mostly just to feel like I accomplished something. I should probably just start over using your docker container before I get too far down this setup path. Cheers!
 

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
Right on. Incidentally, I did get it working today on OLS running on a standard EC2 AMI. Mostly just to feel like I accomplished something. I should probably just start over using your docker container before I get too far down this setup path. Cheers!
I can look up your repository and perhaps it may help me to get the AWS image ready sooner. The only stuff that slows me there is that I'm not used to Amazon AWS that much so I'm still getting into it.
 

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
Oh My God Reaction GIF


I noticed that it will be hard to retrieve these guides, so I made a repo for it.


I will dedicate my free time to steal take all the guides I can find for Chevereto. I will chase that feeling.
 

goldtom

Chevereto Member
Pro
Thanks for pointing me to the old guides repo. After some more effort and failure and rethinking, I am happy to say that my migration looks to have been successful. I am neither a developer nor admin, and this has been my first real project setting up a site basically from scratch, so I'm satisfied, despite the time it has taken for me to figure it out. But I wouldn't rely on my repo as a starting point for any official images; it's as much luck as anything that I got this far.

My starting point was an AWS Lightsail instance I created last year, based on a standard AWS LEMP image.
  • Ubuntu 18.04
  • Nginx
  • MySQL 8.0
  • PHP 7.3 (I think)
  • Chevereto 3.15.1


I wanted to upgrade to latest Chevereto, and that required some changes to other components of that stack (e.g., upgrade PHP), plus I wanted to get off of Lightsail, since it's too expensive for what I'm doing, even for limited performance.

So, I started down the path of migrating my site to a new server on AWS EC2. I started with a new Ubuntu 20.04 image, and I saw the guide involving OpenLiteSpeed, so I figured I'd learn about something new. So, I got that stack set up and the web server running.
  • Just an EC2 t3.micro instance, with an elastic IP and an EBS volume for storage
  • Ubuntu 20.04
  • OpenLiteSpeed
  • MariaDB 10
  • PHP 7.4 (not 8)
  • Route53 for DNS
  • The same S3 bucket as before for photo storage
  • I may eventually move the DB out to its own RDS instance, but it's fine for now

It took a lot of updates to get all of the dependencies for PHP and Chevereto, but I got there. After some trial and error, I just cloned my github repo into the new server's HTML directory and fiddled with the server rewrite rules a bit until I got things loading properly. Imported a dump of my Lightsail DB into the new MariaDB instance with all the same user settings and permissions. Then I was able to log in to Chevereto and run the update to 3.20.8 from the Dashboard web UI.

Maybe that helps someone searching for this type of thing (small personal chev project on AWS) in the future. Let me know if there's anything I can do to help with specifics. Next step for me in the future will be to wrap it up in containers and load balancers, but I'm just not familiar with that stuff yet.
 

jahrinc

Chevereto Member
Thanks for pointing me to the old guides repo. After some more effort and failure and rethinking, I am happy to say that my migration looks to have been successful. I am neither a developer nor admin, and this has been my first real project setting up a site basically from scratch, so I'm satisfied, despite the time it has taken for me to figure it out. But I wouldn't rely on my repo as a starting point for any official images; it's as much luck as anything that I got this far.

My starting point was an AWS Lightsail instance I created last year, based on a standard AWS LEMP image.
  • Ubuntu 18.04
  • Nginx
  • MySQL 8.0
  • PHP 7.3 (I think)
  • Chevereto 3.15.1


I wanted to upgrade to latest Chevereto, and that required some changes to other components of that stack (e.g., upgrade PHP), plus I wanted to get off of Lightsail, since it's too expensive for what I'm doing, even for limited performance.

So, I started down the path of migrating my site to a new server on AWS EC2. I started with a new Ubuntu 20.04 image, and I saw the guide involving OpenLiteSpeed, so I figured I'd learn about something new. So, I got that stack set up and the web server running.
  • Just an EC2 t3.micro instance, with an elastic IP and an EBS volume for storage
  • Ubuntu 20.04
  • OpenLiteSpeed
  • MariaDB 10
  • PHP 7.4 (not 8)
  • Route53 for DNS
  • The same S3 bucket as before for photo storage
  • I may eventually move the DB out to its own RDS instance, but it's fine for now

It took a lot of updates to get all of the dependencies for PHP and Chevereto, but I got there. After some trial and error, I just cloned my github repo into the new server's HTML directory and fiddled with the server rewrite rules a bit until I got things loading properly. Imported a dump of my Lightsail DB into the new MariaDB instance with all the same user settings and permissions. Then I was able to log in to Chevereto and run the update to 3.20.8 from the Dashboard web UI.

Maybe that helps someone searching for this type of thing (small personal chev project on AWS) in the future. Let me know if there's anything I can do to help with specifics. Next step for me in the future will be to wrap it up in containers and load balancers, but I'm just not familiar with that stuff yet.
I did it the lazy way, installed cyberpanel (it installs OpenLiteSpeed + MariaDB + PHP7.2-4 and 8). Had some issues since all the pages were 404, all I needed to do is adjust my .htaccess with the following code, after that all smooth:

Apache config:
# Disable server signature
ServerSignature Off

# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks

# Turn on mod_rewrite
RewriteEngine On

#HERE
RewriteRule ^tool/(.*)$ /tools/sometool/$1 [L]
RewriteRule ^img/(.*)$ /tools/chevereto/$1 [L]

# If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
#RewriteBase /chevereto

# The /api rewrite
RewriteRule ^api$ api.php [L]

# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
# Make sure to apply the correct paths to reflect your current installation
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/system/img/404.gif [NC,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.([a-z]{1,4})$ [NC]
RewriteRule . index.php [L]
 

jahrinc

Chevereto Member
Hmmm, new issue I encountered. When I create an album on the upload page (after file is uploaded I clicked on create new album) and it goes straight to 404.

Not sure what I have to adjust on the .htaccess
 

jahrinc

Chevereto Member
Nevermind, this .htaccess fixed everything!

Code:
Apache config:

# Disable server signature
ServerSignature Off

# Enable CORS across all your subdomains (replace dev\.local with your domain\.com)
# SetEnvIf Origin ^(https?://.+\.dev\.local(?::\d{1,5})?)$   CORS_ALLOW_ORIGIN=$1
# Header append Access-Control-Allow-Origin  %{CORS_ALLOW_ORIGIN}e   env=CORS_ALLOW_ORIGIN
# Header merge  Vary "Origin"

# Disable directory listing (-indexes), Multiviews (-MultiViews)
Options -Indexes
Options -MultiViews

<IfModule mod_rewrite.c>

    RewriteEngine On

    # If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
    # You will also have to change the path to reflect the path to your Chevereto installation
    # If you are using alias is most likely that you will need this.
    #RewriteBase /

    # 404 images
    # If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
    # Make sure to apply the correct paths to reflect your current installation
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) - [NC,L,R=404]
    #RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) content/images/system/default/404.gif [NC,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
    RewriteRule . index.php [L]

</IfModule>
 
Top