Gearbest Banner

SMF 2.0 - Enable PHP7.2+ Compatibility version 1.1

Started by Chen Zhen, April 22, 2018, 11:49:22 PM

previous topic - next topic

Chen Zhen

April 27, 2018, 10:17:36 PM #15 Last Edit: April 27, 2018, 10:25:56 PM by Chen Zhen
This is an apache example from within the main configuration file.
Assuming the encryption files are located in: /etc/letsencrypt/live/example

Within a virtual host configuration (this is for every virtual domain/website in its part of the config.. "example" is just one domain):
Code Select
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example/privkey.pem
SSLCACertificateFile /etc/letsencrypt/live/example/fullchain.pem
SSLCACertificatePath /etc/letsencrypt/live/example/
SSLUseStapling on
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

outside of the virtual host configuration (this edit is only applied once prior to any of the above and not within any vitrual server config commands):
Code Select
SSLStaplingCache shmcb:/tmp/stapling_cache(128000)

Skhilled

April 29, 2018, 03:37:50 PM #16 Last Edit: April 29, 2018, 04:58:56 PM by Skhilled
Ok, I've been at this since last Monday, I think. LOL I've had to install it 4-5 times cause I've either locked myself out, did something and couldn't access ssh or virtualmin, or screwed up a setting and couldn't fix it. LOL But, I've stuck with it all weekend and I think I've almost got everything setup right... Except, I can't access the site I setup in my browser. I can access it via FTP and see the files in File Manager but there's something still not set properly.

As far as LE goes, Go to Webmin -> Webmin Configuration -> SSL Encryption and then the Let's Encrypt tab and adjust the settings from there. I'm not sure what version you have but it was already added to it when I installed Virtualmin. It works:

https://www.mytesterz.pw - that should show a blank page cause I've put an empty index.php in there.

I think my problem is I can't see anything in any subdirectories for some reason. I've put the SMF files in /test directory and it cannot see them.

https://www.mytesterz.pw/test

EDIT: I forgot to mention I'm trying to figure out how to get virtualmin to use LE...

Chen Zhen


Everything is up to date but I prefer to use certbot.
Webmin/Virtualmin do not set up everything properly all the time so I have learned.
Make sure it set www and non www for your websites because even though you set Apache/Nginx or use a .htaccess file to direct it as you wish it still needs both registered to work without error.

Perhaps you are having a permission/owner issue.
Try this command for you website directory...
(replace USERNAME with the user name you used + its path):
Code Select
setfacl -R -m u:USERNAME:rwx /home/USERNAME/public_html

.. this will allow apache and ftp to gain access under your user name.


Skhilled

Permissions for directories are 775 and files are 674? WTH? LOL I've been on so many servers and hosting I've lost count but this is the first time I've seen 674 for files.

However, the code you gave did not seem to work. I still can't see the site and the permissions are still screwed up. Ownership is correct.

I just realized I can easily change them in webmin and fixed them. But I still can't see that link... LOL

Well, I think it's going to take some time for me to get used to using Virtualmin/Webmin. It's very different from WHM which is much easier to use and automates a lot of things. I do plan on switching from WHM (paid) to this (free) eventually but it's just going to take some time to get adjusted.

Chen Zhen


It's been a bumpy road for me going through the learning curve of self managed VPS using a free panel.
I made a few mistakes along the way & some people are really p*ssed at me (possibly permanently).  :(  :(

0775 for directories is ok or you can try 0755.
For files I think it is 0666.


Chen Zhen


It might be 0644 for files.. I can't remember atm.

Here are commands to change permissions.
Opt the octet to what you want.


change USERNAME to the appropriate directory
Code Select
find /home/USERNAME/public_html -type d -exec chmod 755 {} +
find /home/USERNAME/public_html -type f -exec chmod 644 {} +

Skhilled

I usually used 755 for directories and 664 for files. Most webservers and hosting use that although I've had some that don't but those tend to give me problems with installs, uploads, etc. so I stick with 755 and 644.

I've used those commands for changing permissions as well. I've forgot I had used them and them in a file so I can remember if I forget. LOL

Chen Zhen

May 10, 2018, 11:09:22 PM #22 Last Edit: May 10, 2018, 11:12:04 PM by Chen Zhen
I updated this a few weeks ago mostly for the SMF 2.0.X branch.
It seems to be working very smoothly now on both SMF 2.0.15 & SMF 2.1 Beta4.
No issues thus far after the latest update.

I suppose I am the only one able to test it in a production environment so far?

FYI - local testing of SMTP email & PHP 7.2 is possible if you modify the local server software you are using.
I found some basic instruction for Wampserver which serves me very well.

Skhilled

Sorry, but I've been very busy lately. Had some server issues we've been working on. However, I did create a new VPS and installed whm on it. I have just a few more things to fix and I'll give this a test on that server.