Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - luddite33

Pages: [1]
1
CentOS-WebPanel Bugs / Re: CPU 100% clamd
« on: July 31, 2019, 11:31:00 AM »
I just encountered this after the last update to CWPpro version: 0.9.8.855 a couple of days ago.

I tried the /scripts/clamd_fix_100_cpu_usage and it didn't work.

I then tried gerasandor and added some additions and still not working.

First stop clamAV and AMaViS
- rm -f /var/run/clamd.amavisd/clamd.sock
- rm -f /var/run/clamd.amavisd/clamd.pid
- cd /var/lib/clamav && rm -f *cld *cvd
- freshclam update virus definitions

Database is updated and cpu is still at 100%.

I would love some help here please.

2
Also add the below code before the first location block.

return 301 https://$server_name$request_uri;

3
1. Go WebServer Settings > Select WebServers and select Nginx Only.
2. Go PHP Settings > PHP-FPM Selector and choose PHP-FPM latest version (mine is 7.3)
3. cd /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/nginx/php-fpm and edit force-https.stpl and default.stpl default.tpl and add into the / block
     location / {
           ......lots of stuff....
           # WordPress permalinks in Nginx
           try_files $uri $uri/ /index.php?$args;
                ......lots of stuff....
        }

4. Go WebServers Settings > WebServers Main Conf and select PHP-FPM, force-https, 7.3, force-https and default. Rebuild all hosts.
5. Go check in /etc/nginx/conf.d/vhosts/ that your domains have the try_files clause.
6. Hit your domain on http and it should re-direct to https. Click a menu item (not home page) and it should bring up the correct page instead of a 404.
7. Permalinks now work. /page/
8. If you update CWP version then you have to do all this again. I can do it in a couple of minutes now after updating.


4
E-Mail / How-to setup email with external DNS
« on: July 27, 2019, 11:51:00 AM »
I am just adding this here for my own knowledge and to help others.

1. Go to Email > Email Accounts and click "Add New Domain Email", select the domain and create your email address.
This will enable roundcube and you will be able to send emails but you won't be able to receive emails yet.
2. Go to Email > Mailserver Manager and check the top 3 boxes and then click "Rebuild Mail Server"
AntiSpam/AntiVirus (recommended):   
rDNS Check (recommended):   
Install DKIM & SPF (recommended):   
3. Go to Email > DKIM Manager. Make sure your domain has 4 green ticks in TrustedHosts, KeyTable, v=DKIM1,v=spf1
If you don't then complete the form for "Add DKIM & SPF". Then go to Email > Mailserver Manager and repeat the "Rebuild Mail Server" and restart all mail services. Come back to this page and you should now see all 4 green ticks.
4. Now we have to create MX records on your external DNS. I use Godaddy. Edit your DNS.
5. Add MX records for your server. You have to use the server name. In my case i found it "Email > rDNS Checker" and you will see the server dns. Mine was ip-PPP-ZZZ-YYY-XXX.ip.secureserver.net. So I copy that to MX and set priority to 10 and repeat with priority 20
6. Add DKIM to DNS. Go to Email > DKIM Manager and click your domain "Edit File" and you will see the DKIM and SPF records to add to Godaddy.
7. Add TXT record host="_dmarc" and TXT="v=DMARC1; p=none"
8. Add TXT record host="yourdomain.com." and TXT="v=spf1 mx ~all" <- this will tell your DNS to use your MX records for spf
9. Create cnames to @ for SMTP, IMAP, WEBMAIL and MAIL.
10. Go to https://www.mail-tester.com/ and follow directions. I ended up with a 9.8 out of 10 which is as good as it gets.
11. Send an email from any other account to your new email.
12. Now go to roundcube and login. https://mail.yourdomain.com:2087/roundcube/?_task=mail&_mbox=INBOX (SSL isn't enabled but im working on that). You should see your email.

5
SSL / Re: SSL for Hostname
« on: July 01, 2019, 05:44:20 AM »
Hi - thanks so much. That worked perfectly.

But I think another issue exists after following the below directions. It now has stated that the certificate is valid for port 2031(after I restart as directed).

Unfortunately for port 2087 it now shows that although the certificate is valid that there is still insecurity. I am happy to use 2031 but should i be concerned about 2087 not being secure?

make sure you have a hostname which resolves to your Public IP.

then go to CWP.Admin -> Server settings -> click Change hostname( this will set hostname and install SSL to the hostname)

After restart cwpsrv from the terminal by running the command below

sh /scripts/restart_cwpsrv

6
Scripts / Re: StingRay's Dark Theme for CWP
« on: July 01, 2019, 03:47:49 AM »
Thank-you raylee, midzan21  and Gogo. I used both your tips and successfully applied StingRay's dark theme. Looks great!

  • Distro Name: CentOS Linux release 7.6.1810 (Core)
  • CWPpro version: 0.9.8.838

For all of you that have poblem installing this script this is how I personally did it because it caused errors other way

1) Use some SFTP program and gain root access using it (WinSCP in my opinion is best)
2) Go To /usr/local/cwpsrv/htdocs/admin/design/css and copy custom.css to personal computer somewhere
3) Edit custom.css file on PC using editor from your opinion with options from script (gist with clear code - https://gist.github.com/markoidzan/e0bf9527205a04bef3df09aa1509212b)
4) DELETE original custom.css file
5) Upload edited custom.css file
6) Restart cwpsrv with service cwpsrv restart in SSH
7) enjoy in theme

@midzan21 How did you manage to delete locked custom.css?

EDIt: Ok, I found way.
Code: [Select]
cd /usr/local/cwpsrv/htdocs/admin/design
chattr -d -suSiadAc ./css/
cd /usr/local/cwpsrv/htdocs/admin/design/css
chattr -a FILE_NAME
chattr -i FILE_NAME


Pages: [1]