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 - GTMAN

Pages: 1 [2] 3 4 5
17
Varnish / Re: Wordpress robust default.vcl ? do you have any?
« on: March 14, 2019, 05:24:06 PM »
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/wordpress.tpl


Code: [Select]
backend %backend_domain% {
.host = "%proxy_ip%";
.port = "%proxy_port%";
}

sub vcl_recv {
if (req.http.host ~ "%domain%") {
   set req.backend_hint = %backend_domain%;
}

# Always cache the following file types for all users.
if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|html|htm)(\?[a-z0-9]+)?$") {
unset req.http.Cookie;
}

# Remove any Google Analytics based cookies
set req.http.Cookie = regsuball(req.http.Cookie, "has_js=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "__utm.=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "_ga=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "utmctr=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "utmcmd.=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "utmccn.=[^;]+(; )?", "");

# Do not cache AJAX requests.
if (req.http.X-Requested-With == "XMLHttpRequest") {
return(pass);
}

# Post requests will not be cached
if (req.http.Authorization || req.method == "POST") {
return (pass);
}
if (req.method != "GET" && req.method != "HEAD") {
return (pass);
}

# Do not cache Authorized requests.
if (req.http.Authorization) {
return(pass);
}

# LetsEncrypt Certbot passthrough
if (req.url ~ "^/\.well-known/acme-challenge/") {
return (pass);
}

# Forward client's IP to the backend
if (req.restarts == 0) {
if (req.http.X-Real-IP) {
set req.http.X-Forwarded-For = req.http.X-Real-IP;
} else if (req.http.X-Forwarded-For) {
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
} else {
set req.http.X-Forwarded-For = client.ip;
}
}

### Wordpress ###
if (req.url ~ "(wp-admin|post\.php|edit\.php|wp-login)") {
return(pass);
}
if (req.url ~ "/wp-cron.php" || req.url ~ "preview=true") {
return (pass);
}

# WP-Affiliate
if ( req.url ~ "\?ref=" ) {
return (pass);
}

set req.http.Cookie = regsuball(req.http.Cookie, "wp-settings-1=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "wp-settings-time-1=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "wordpress_test_cookie=[^;]+(; )?", "");
set req.http.Cookie = regsuball(req.http.Cookie, "PHPSESSID=[^;]+(; )?", "");

return (hash);
}

18
Installation / Re: Splitting Email with CWP
« on: March 12, 2019, 03:18:31 PM »
How about doing that at the DNS level? Point the one account to the 365 server.

19
High Performance / Re: Wordpress - High-Performance instructions
« on: March 02, 2019, 04:30:01 PM »
Are you using SSL? I had to delete the certs and reinstall them after I setup the Webservers Domain Conf.

I'm running Nginx>Varnish>Apache > php-fpm > ClassicPress (Fork of WordPress) with no problems.

20
CentOS 7 Problems / Re: port 2304 failed
« on: February 25, 2019, 07:13:29 PM »
Open the ports in the CSF Firewall config file?

21
Apache / Re: Unable to write .htaccess in my CWP
« on: February 25, 2019, 05:53:39 PM »
Who is the owner of the files and folders? How did you install  WordPress?

22
Check this out. Might be built in so do a php -v

https://www.tecmint.com/install-opcache-in-centos-7/

23
PHP Selector / Re: Disable NOTICE Log PHP-FPM
« on: February 11, 2019, 07:03:04 PM »
Did you restart the webserver?

24
PHP Selector / Re: Disable NOTICE Log PHP-FPM
« on: February 08, 2019, 02:07:07 PM »
/opt/alt/php-fpm72/usr/php

php.ini line 460

Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; This directive informs PHP of which errors, warnings and notices you would like
; it to take action for. The recommended way of setting values for this
; directive is through the use of the error level constants and bitwise
; operators. The error level constants are below here for convenience as well as
; some common settings and their meanings.
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
; those related to E_NOTICE and E_STRICT, which together cover best practices and
; recommended coding standards in PHP. For performance reasons, this is the
; recommend error reporting setting. Your production server shouldn't be wasting
; resources complaining about best practices and coding standards. That's what
; development servers and development settings are for.
; Note: The php.ini-development file has this setting as E_ALL. This
; means it pretty much reports everything which is exactly what you want during
; development and early testing.
;
; Error Level Constants:
; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
; E_ERROR           - fatal run-time errors
; E_RECOVERABLE_ERROR  - almost fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it is automatically initialized to an
;                     empty string)
; E_STRICT          - run-time notices, enable to have PHP suggest changes
;                     to your code which will ensure the best interoperability
;                     and forward compatibility of your code
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
; E_DEPRECATED      - warn about code that will not work in future versions
;                     of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
;   E_ALL (Show all errors, warnings and notices including coding standards.)
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices)
;   E_ALL & ~E_NOTICE & ~E_STRICT  (Show all errors, except for notices and coding standards warnings.)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT


25
CentOS 7 Problems / Re: high disk space consumption
« on: February 06, 2019, 07:46:00 PM »
Look in the folder files and see what is being logged. Fix the problems. Rename log file and see if new one is created. If true delete old large file.

26
PHP / Re: Changes in PHP.INI won't work!
« on: February 05, 2019, 02:27:45 PM »
PHP-FPM uses a different file.

Put .user.ini (note the 2 dots) in public_html with your declarations in it. If it doesn't work for WordPress move the file to wp-admin folder.

http://php.net/manual/en/configuration.file.per-user.php

27
Installation / Re: Nginx & Varnish & Apache SSL no work
« on: January 29, 2019, 09:40:42 PM »
Try deleting and reinstalling the SSL certs after you have run domain conf. Worked for me.

28
Installation / Re: How to increase post_max_size in CWP?
« on: January 25, 2019, 02:38:23 PM »
Just to be clear it's .user.ini

29
Installation / Re: How to increase post_max_size in CWP?
« on: January 24, 2019, 06:16:13 PM »
Move the .user.ini file into the wp-admin folder or edit the yourdomain.conf file here:

Code: [Select]
/usr/local/apache/conf.d/vhosts
Remove the trailing slash from localhost line.

Code: [Select]
<IfModule proxy_fcgi_module>
<FilesMatch \.php$>
SetHandler "proxy:unix:/opt/alt/php-fpm73/usr/var/sockets/gtmanage.sock|fcgi://localhost"
</FilesMatch>
</IfModule>

The trailing slash is in the template file so every time you rebuild vhost files it will be added again. I have reported the bug a month ago and it was supposed to be fixed. You can create a copy and edit the templates here:
Code: [Select]
/usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/httpd/php-fpm
See here for more info.
http://wiki.centos-webpanel.com/webservers-vhost-templates

 

Pages: 1 [2] 3 4 5