Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 09-06-2017, 08:38 PM   #101
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
And this

Code:
[email protected]:~# sudo mkdir /var/mysqltmp
mkdir: cannot create directory ‘/var/mysqltmp’: No space left on device
How is it possible that sites that in 5 years have reached 12 GB now fill 40gb in a few days???

What are you eating all this space?
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-06-2017, 10:16 PM   #102
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
Maybe now it works...

A lighting crossed my mind while I was pooping...

And I remembered having activated it in its time: Standard HTTP Caching
https://www.digitalocean.com/communi...n-ubuntu-14-04

In which I remembered that there were some lines, like these:
CacheLockPath /tmp/mod_cache-lock
CacheEnable disk

I had added them to the virtual host file in the first site, just to try, and when I added the new domains (copying the config file) I copied them to all new sites...

I removed them from the .conf files and for the moment everything seems to be back to work.

I restarted the server, but I probably have not freed all the space used by these caches, I have to understand how to do it... and disable them permanently...

Check in the next few days to see if everything works...
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-07-2017, 05:52 PM   #103
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
What does updatedb.mlocat?

It is kinda that I observe this graph on digitalocean the second service that sucks resources is always updatedb.mlocat.



I searched a bit in Google, I found many guides on how to disable it, or remove it, or delete it from the cronjob.

But after many searches I have not yet figured out what it does and if it is a necessary service...

Someone can tell me what it is and what it does?

And if it can be disabled?

Strange thing, I see it only on Digitalocean, Nixstat does not show it

porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-07-2017, 10:54 PM   #104
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
Locate is a system tool used like find
update db.mlocat is its database used

Code:
[email protected]:/$ locate apache|grep error
/etc/apache2/conf-available/localized-error-pages.conf
/etc/apache2/conf-enabled/localized-error-pages.conf
/home/barry/server-host-configuration/domains/apache-sites/sites-available/apache-error-module
/usr/share/apache2/error
/usr/share/apache2/error/HTTP_BAD_GATEWAY.html.var
/usr/share/apache2/error/HTTP_BAD_REQUEST.html.var
/usr/share/apache2/error/HTTP_FORBIDDEN.html.var
/usr/share/apache2/error/HTTP_GONE.html.var
/usr/share/apache2/error/HTTP_INTERNAL_SERVER_ERROR.html.var
/usr/share/apache2/error/HTTP_LENGTH_REQUIRED.html.var
/usr/share/apache2/error/HTTP_METHOD_NOT_ALLOWED.html.var
/usr/share/apache2/error/HTTP_NOT_FOUND.html.var
/usr/share/apache2/error/HTTP_NOT_IMPLEMENTED.html.var
/usr/share/apache2/error/HTTP_PRECONDITION_FAILED.html.var
/usr/share/apache2/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
/usr/share/apache2/error/HTTP_REQUEST_TIME_OUT.html.var
/usr/share/apache2/error/HTTP_REQUEST_URI_TOO_LARGE.html.var
/usr/share/apache2/error/HTTP_SERVICE_UNAVAILABLE.html.var
/usr/share/apache2/error/HTTP_UNAUTHORIZED.html.var
/usr/share/apache2/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
/usr/share/apache2/error/HTTP_VARIANT_ALSO_VARIES.html.var
/usr/share/apache2/error/README
/usr/share/apache2/error/contact.html.var
/usr/share/apache2/error/include
/usr/share/apache2/error/include/bottom.html
/usr/share/apache2/error/include/spacer.html
/usr/share/apache2/error/include/top.html
/var/lib/apache2/conf/enabled_by_maint/localized-error-pages
/var/log/apache2/error.log
/var/log/apache2/error.log.1
/var/log/apache2/error.log.10.gz
/var/log/apache2/error.log.11.gz
/var/log/apache2/error.log.12.gz
/var/log/apache2/error.log.13.gz
/var/log/apache2/error.log.14.gz
/var/log/apache2/error.log.2.gz
/var/log/apache2/error.log.3.gz
/var/log/apache2/error.log.4.gz
/var/log/apache2/error.log.5.gz
/var/log/apache2/error.log.6.gz
/var/log/apache2/error.log.7.gz
/var/log/apache2/error.log.8.gz
/var/log/apache2/error.log.9.gz
Code:
[email protected]:/$ apt search mlocat
Sorting... Done
Full Text Search... Done

mlocate/xenial,now 0.26-1ubuntu2 amd64 [installed,automatic]
  quickly find files on the filesystem based on their name
Use apt search to get information on installed processes, dameons or programs installed in Debian/Ubuntu LINUX

sudo apt autoremove mlocate
sudo apt purge mlocate
if you really want to remove mlocate.

Code:
[email protected]:/$ locate mlocat
/etc/cron.daily/mlocate
/usr/bin/mlocate
/usr/bin/updatedb.mlocate
/usr/share/doc/mlocate
/usr/share/doc/mlocate/AUTHORS
/usr/share/doc/mlocate/NEWS.gz
/usr/share/doc/mlocate/README
/usr/share/doc/mlocate/TODO.Debian
/usr/share/doc/mlocate/changelog.Debian.gz
/usr/share/doc/mlocate/copyright
/usr/share/locale-langpack/en_AU/LC_MESSAGES/mlocate.mo
/usr/share/locale-langpack/en_GB/LC_MESSAGES/mlocate.mo
/usr/share/man/man1/mlocate.1.gz
/usr/share/man/man5/mlocate.db.5.gz
/var/lib/mlocate
/var/lib/dpkg/info/mlocate.conffiles
/var/lib/dpkg/info/mlocate.list
/var/lib/dpkg/info/mlocate.md5sums
/var/lib/dpkg/info/mlocate.postinst
/var/lib/dpkg/info/mlocate.postrm
/var/lib/dpkg/info/mlocate.prerm
/var/lib/mlocate/mlocate.db
/var/lib/mlocate/mlocate.db.CBhsCO
[email protected]:/$
When the Mongols lead by the Great Khan invaded civilization they destroyed the farming infrastructure without regard to importance to the peasants survival because as nomads they did not understand what it was.

cat /usr/share/doc/mlocate/README
About
=====
mlocate is a locate/updatedb implementation. The 'm' stands for "merging":
updatedb reuses the existing database to avoid rereading most of the file
system, which makes updatedb faster and does not trash the system caches as
much.

The locate(1) utility is intended to be completely compatible to slocate. It
also attempts to be compatible to GNU locate, when it does not conflict with
slocate compatibility.

New releases will be available at https://fedorahosted.org/mlocate/ .

Installation
============
Before installation it is necessary to create a group called "mlocate" to allow
hiding the contents of the database from users.

When updatedb is run by root, the database contains names of files of all
users, but only members of the "mlocate" group may access it. "locate" is
installed set-GID "mlocate", no other program should need to run with this GID.

Portability
===========
mlocate should be portable to all SUSv3-compliant UNIXes, although it is
currently tested only on recent Linux distributions.

Bugs
====
Please consider reporting the bug to your distribution's bug tracking system.
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-08-2017, 03:52 PM   #105
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
So maybe for now I keep it... anyway CPUs we still have...

The very serious problem that I thought I had solved and instead I still is the space...

I know that all my sites together (on cpanel other server) weigh about 10-12 Gb and in this new server I have not yet transferred the two heavier.

Today trying to decompress a file of about 300Mb I received the message out of space.

And I can't even figure out if it's true that space is exhausted...

When login:

Code:
  System load:  0.31               Processes:           105
  Usage of /:   37.1% of 39.34GB   Users logged in:     0
  Memory usage: 8%                 IP address for eth0: 139.59.71.64
  Swap usage:   0%
Digitalocean monitor



Nixstats monitor




Code:
[email protected]:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            997M   12K  997M   1% /dev
tmpfs           201M  364K  200M   1% /run
/dev/vda1        40G   15G   24G  39% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none           1001M     0 1001M   0% /run/shm
none            100M     0  100M   0% /run/user
Code:
[email protected]:~# du -max / | sort -rn | head -20
15108	/
13885	/var
10806	/var/cache
10655	/var/cache/apache2/mod_cache_disk
10655	/var/cache/apache2
1216	/var/log
988	/var/www/html
988	/var/www
921	/usr
882	/var/log/apache2
874	/var/lib
499	/var/lib/mysql
445	/var/log/apache2/access.log
372	/var/log/apache2/access.log.1
353	/usr/lib
296	/var/www/html/cdn.zip
263	/usr/share
242	/var/www/html/bigboobsupdate.com
218	/var/lib/mlocate/mlocate.db
218	/var/lib/mlocate
Code:
[email protected]:~# sudo du -sxm /var/* | sort -nr | head -n 15
10819	/var/cache
1209	/var/log
1021	/var/www
873	/var/lib
2	/var/backups
1	/var/tmp
1	/var/spool
1	/var/opt
1	/var/mail
1	/var/local
1	/var/crash
0	/var/run
0	/var/lock

[email protected]:~# sudo du -sxm /var/cache/* | sort -nr | head -n 15
10668	/var/cache/apache2
89	/var/cache/apt-xapian-index
56	/var/cache/apt
6	/var/cache/debconf
2	/var/cache/man
1	/var/cache/pppconfig
1	/var/cache/pollinate
1	/var/cache/ldconfig
1	/var/cache/dbconfig-common
1	/var/cache/apparmor
I just can't understand what is eating all this space, and I can't do anything until I solve this problem, not even to transfer the last 2 sites.

I no longer have the problem of the other day when the sites showed only errors, now seem to remain online, but the space on the server is always exhausted...
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-08-2017, 08:13 PM   #106
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
[email protected]:/home# du -sh
or were your web root is

/var/www ?

du -h

will be more verbose

check the webroot are you caching any content?
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-08-2017, 09:25 PM   #107
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
Code:
[email protected]:/var/www/html# du -sh
988M	.
[email protected]:/var/www/html# du -h
612K	./tranny-hardpics.com/images
24K	./tranny-hardpics.com/admin
93M	./tranny-hardpics.com
1.7M	./pornstarvideoupdates.com/images
28K	./pornstarvideoupdates.com/admin
110M	./pornstarvideoupdates.com
8.0K	./function_global/poptm
36K	./function_global/chaturbate_banner_rss
12K	./function_global/bongacash_banner
12K	./function_global/traffic_company_banner/mio iframe
32K	./function_global/traffic_company_banner
68K	./function_global/page_banner
12K	./function_global/hilltopads code.txt
8.0K	./function_global/pdo
12K	./function_global/popads_adblock
16K	./function_global/popads
8.0K	./function_global/mobile_detect/export
8.0K	./function_global/mobile_detect/namespaced/Detection
12K	./function_global/mobile_detect/namespaced
288K	./function_global/mobile_detect/tests/providers/vendors
292K	./function_global/mobile_detect/tests/providers
776K	./function_global/mobile_detect/tests
24K	./function_global/mobile_detect/examples
1.2M	./function_global/mobile_detect
160K	./function_global/juicyads_banner
12K	./function_global/clickadu
1.9M	./function_global
684K	./alternativegirlshardpics.com/images
20K	./alternativegirlshardpics.com/admin
28M	./alternativegirlshardpics.com
656K	./tranny-search.com/images
20K	./tranny-search.com/admin
80M	./tranny-search.com
4.0K	./cdn
676K	./veryhardpics.com/images
24K	./veryhardpics.com/admin
79M	./veryhardpics.com
636K	./tranny-beauty.com/images
24K	./tranny-beauty.com/admin
63M	./tranny-beauty.com
1.6M	./bigboobsupdate.com/images
28K	./bigboobsupdate.com/admin
4.0K	./bigboobsupdate.com/cgi-bin
242M	./bigboobsupdate.com
988M	.


That I know, the only cache systems currently installed are APCU, memcached, Opcache

CDN is the only folder with about 15000 photos, but it is the one that I can not extract because it is finished space
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-10-2017, 02:00 AM   #108
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
(15000*100K)*1000
1,500,000,000

/CDN is 1.5 GB maybe

why are there no users shown? /home/user
what is 'finished space' supposed to mean?
root should be able to access all locations.
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-11-2017, 07:26 AM   #109
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289


No, CDN is still empty, I managed to load the zip, but when I try to extract, it extracts some photos and then "Space finished".

Also extracted, CDN weighs about 309 Mb



The strange thing is also that some counters see exhausted space, other half empty...

Maybe some counters don't see the data in some caches?

I'm still thinking about those damned "Standard HTTP caching", which saved here /var/cache/apache2/mod_cache_disk, and actually in this folder there is still something...





I would try to empty it/delete it, but can I do it with an "rm", or will it destroy the server?
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-11-2017, 07:39 AM   #110
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
Umh...I did this

Code:
[email protected]:/var/cache/apache2/mod_cache_disk# du -sh
11G	.
But I also found this

File: /etc/default/apache2
Code:
### htcacheclean settings ###

## run htcacheclean: yes, no, auto
## auto means run if /etc/apache2/mods-enabled/cache_disk.load exists
## default: auto
HTCACHECLEAN_RUN=auto

## run mode: cron, daemon
## run in daemon mode or as daily cron job
## default: daemon
HTCACHECLEAN_MODE=daemon

## cache size
HTCACHECLEAN_SIZE=300M

## interval: if in daemon mode, clean cache every x minutes
HTCACHECLEAN_DAEMON_INTERVAL=120

## path to cache
## must be the same as in CacheRoot directive
HTCACHECLEAN_PATH=/var/cache/apache2/mod_cache_disk

## additional options:
## -n : be nice
## -t : remove empty directories
HTCACHECLEAN_OPTIONS="-n"
It seems that it should be limited and eliminated regularly...

But something seems not to have worked properly...
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-11-2017, 08:27 AM   #111
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
I launched this:
Code:
[email protected]:~# htcacheclean -p/var/cache/apache2/mod_cache_disk -l 1
Ubuntu Manpage: htcacheclean - Clean up the disk cache

Something he did
Code:
  System load: 0.0                Memory usage: 3%   Processes:       70
  Usage of /:  32.0% of 39.34GB   Swap usage:   0%   Users logged in: 0
Although I expected more by removing 11 Gb...
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-14-2017, 08:47 AM   #112
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289


Much better than before, but the time still seems a little high...

Will it improve over time? Can I improve it in some way?
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-14-2017, 01:27 PM   #113
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
If you are using Varnish you are caching pages -- and taking up space -- see if you can purge the pages little used on a daily basis?

If you request images from other servers you may have slow page load times depending on the number of images requested, the geolocation and peering to your server(s) and the current load on the server you are requesting images from.

Fewer images per page might help. Using jQuery lazy load in your HTML might help also. The initial load time should stat out better.
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2017, 08:55 AM   #114
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
Varnish I installed it, but it practically never worked, on Digitalocean Varnish and Apache quarrel for the port 80 due to some symbolic link. The thing was resolved on 16.04, but a little abandoned to itself on the one of 14.04.
Currently it seems that or start Apache or start varnish, together do not want to work

Unfortunately almost all images of my sites are on the sites of content producer, on which I have no control.
I tried long ago to create the thumbnails and host them on my server (in the CDN folder) using CloudFlare for cache and CDN, but I lost about 80% of the visits...
Is still more or less active here: Big Boobs Hard Pics | Big Boobs, Huge Boobs, Huge Tits, Busty,, but I have not recovered all the visits.

For some time I have installed a lazyload http://www.lezdomhardtube.com/lazysizes.min.js, but not that of jquery, because only the jquery framework weighs practically more than the code of my sites.
Of this lazyload I am not very convinced, because it does not load all the photos of the page, but it loads more than those visible in the window... seems to do his job, but a little too much... and I have not noticed significant changes between first and after the implementation of this Lazyload...
As soon as I have free time I try another, just to try.

Always thanks for the answers
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-15-2017, 10:26 AM   #115
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
I'm trying to focus on the headers for speed up.

Because for example I have enabled mod_deflate, but I do not understand if it is compressing and what is compressing...

I have all its nice rules in the htaccess files of each site, but I have no idea what it is, or where it is, the configuration of my server.

Code:
<IfModule mod_deflate.c>
      <IfModule mod_setenvif.c>
            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
            BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
      </IfModule>
      <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
      </IfModule>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
</IfModule>
In cpanel There is the option "compress all" and you have no way to do anything else.
With the server however I saw that there are configurations on the level of compression, but I can not even find the configuration files, in the sense that I find the files, but inside there is nothing of everything that is spoken on the guides...



Another thing for example I would like to add CharSet: UTF-8 to the Content-type header

I have seen guides where they say they are in the httpd. conf file that I do not find or in the Apache configuration files, and in mine there is nothing about it...

I'm not understanding anything...

This is the current configuration of the headers of my sites, definitely missing something, but I can not figure out how to add or edit.. (except via httaccess)



What and how can I configure server headers globally, without using individual htaccess?
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2017, 10:06 AM   #116
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
So... in a couple of days I realized something... but I realized that practically there is nothing to understand...

Deflate already seems to do everything alone and work very well as it is...

And even less touches better is...

I have however found that some tools like Pagespeed, Gtmetrix, varvy, say that compression is not enabled because of these 2 files:
search.js
lazysizes.min.js

I added to /etc/apache2/mods-enabled/deflate.conf "text/javascript" (idea found searching) and search.js seems to have resolved, but continue to tell me that compression is not enabled for lazysizes.min.js, perhaps because of the "min", which maybe does recognize the extension.

I could make a change in my sites and remove the min from the filename, but it would take a long time, and surely sooner or later the thing would repeat in the future.

Is there a way to fix it permanently via server, the failure to compress .js and .min.js files?


P.S.
For the Charset Utf-8 I realized that it is in this file:/etc/apache2/conf-available/charset.conf
And just enable this: AddDefaultCharset UTF-8

P.P.S.
Considering that almost all images of my sites come from external resources, can it be a good idea to enable compression even for images via deflate?
Or would it completely kill my server's resources?
Does deflate also affect images from external resources?

P.P.P.S.
In Pagespeed I noticed for the first time Pagespeed module for Apache (I had never noticed before not having a server).
Can be a good or bad idea?
Usually I do not trust too much of BigG because he has a tendency to take much more than he gives, and I do not want to give free the resources of my server to him. He doesn't really need it.
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2017, 10:46 AM   #117
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
It might be just easier to spend another $20/mo and expand the server's resources?

Quote:
Does deflate also affect images from external resources?
NO
that is a remote server you cannot control.

use

$ sed 's/\.min//g'
test it first
then sed -i.bk
-i [in place edit].bk [.bk backupfile]

I like to make a backup directory with copies in case I fuck-up
Code:
$ mkdir backedup; cp * backedup
you will need the file paths
Code:
$ find . -name "*.min.js"
or
Code:
$ find . -name "*.js" -o  -name "*.min.js"
find . is recursive so start in the right location near just above the files.

to find script references
is recursive so start in the right location near just above the files.
Code:
$ grep -rni '.js'
JavaScripts are generally cashed in browsers -- their requests are 304 usually after the first visit -- certainly per session. Exceptions being deleted user cache files and private/incognito sessions.
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-18-2017, 11:55 AM   #118
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
But I know the file, is the famous lazyload (sorry if I have not written it before, I did not thinking about)

But I can not understand why it is not compressed by deflate
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old Today, 12:54 PM   #119
porn-update
Confirmed User
 
porn-update's Avatar
 
Industry Role:
Join Date: Apr 2014
Posts: 289
I was thinking of installing Fail2ban, but I saw that it reads Apache errors.

So much to look at, I opened Apache errors
I noticed that my Apache logs are full of this:
Code:
[Mon SEP 18 06:39:16.678185 2017] [Core: ERROR] [PID 31667] [Client 180.76.15.6:29891] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ' LimitInternalRecursion ' to increase the limit if necessary. Use ' LogLevel debug ' to get a backtrace.
[Mon SEP 18 06:39:18.149155 2017] [Core: ERROR] [PID 31837] [Client 180.76.15.23:55177] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ' LimitInternalRecursion ' to increase the limit if necessary. Use ' LogLevel debug ' to get a backtrace.
[Mon SEP 18 06:39:18.653379 2017] [Core: ERROR] [PID 31984] [Client 180.76.15.141:41970] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ' LimitInternalRecursion ' to increase the limit if necessary. Use ' LogLevel debug ' to get a backtrace.
The IP seems to be Baidu, which I block via htaccess in all my sites with:
Code:
RewriteCond %{HTTP_USER_AGENT} ^.*MJ12bot [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Yandex [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*Baidu [NC]
RewriteRule .*  - [L,F]
(It is a rule that they have made me add various hosting and VPS services, to try to find resources to keep sites online. I don't even know if it's a good thing or not...)

I'm afraid that installing Fail2ban would read continually new errors and probably he will drink all the resources of my server...

(also the fact that each visit generates a log line I do not like so much)

Looking in G, it seems to be some url_rewriter problem.

Looking for logLevel debug I found this:
mod_rewrite - Apache HTTP Server Version 2.4

But I think I didn't understand something because:
Code:
[email protected]:~# tail -f error_log|fgrep '[rewrite:'
tail: cannot open ‘error_log’ for reading: No such file or directory
[email protected]:~# LogLevel alert rewrite:trace3
LogLevel: command not found

What am I missing? How should I use this?
porn-update is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old Today, 04:52 PM   #120
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
Quote:
Originally Posted by porn-update View Post
I was thinking of installing Fail2ban, but I saw that it reads Apache errors.....

But I think I didn't understand something because:
Code:
[email protected]:~# tail -f error_log|fgrep '[rewrite:'
tail: cannot open ‘error_log’ for reading: No such file or directory
[email protected]:~# LogLevel alert rewrite:trace3
LogLevel: command not found

What am I missing? How should I use this?
You need to find the location of the error log for that domain.

use find or locate or read the configuration file for that domain

Code:
$ cd /etc/apache2/sites-available
$ tac <domain file> |less
or from ~ of root


Code:
$ (cd /etc/apache2/sites-available &&  grep -i 'error\.log' <domain config file>
then when you have the location (path)

Code:
$ tac <path/to/file/error.log> |less
this will read the file starting from the last line. less is one screen at a time, space bar next page -- return next line, q is quit and close the command (tac) tac is cat backwards -- get it?

Code:
$ tac <path/to/file/error.log> egrep -i 'this|or|that' |less

$  man grep
#for more command options
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old Today, 05:03 PM   #121
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
deny from 180.76.15.0/24

but I think that iptables or ufw firewalls are a better way to go than .htaccess

Baidu is velly sneeky ...


Code:
[email protected](none):~# dig ANY baidu.com

; <<>> DiG 9.7.3 <<>> ANY baidu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9342
;; flags: qr rd ra; QUERY: 1, ANSWER: 15, AUTHORITY: 0, ADDITIONAL: 2

;; QUESTION SECTION:
;baidu.com.			IN	ANY

;; ANSWER SECTION:
baidu.com.		7200	IN	SOA	dns.baidu.com. sa.baidu.com. 2012136870 300 300 2592000 7200
baidu.com.		7200	IN	TXT	"v=spf1 include:spf1.baidu.com include:spf2.baidu.com include:spf3.baidu.com a mx ptr -all"
baidu.com.		7200	IN	TXT	"google-site-verification=GHb98-6msqyx_qqjGl5eRatD3QTHyVB6-xQ3gJB5UwM"
baidu.com.		7200	IN	MX	20 mx50.baidu.com.
baidu.com.		7200	IN	MX	10 mx.n.shifen.com.
baidu.com.		7200	IN	MX	20 mx1.baidu.com.
baidu.com.		7200	IN	MX	20 jpmx.baidu.com.
baidu.com.		539	IN	A	123.125.114.144
baidu.com.		539	IN	A	220.181.57.217
baidu.com.		539	IN	A	111.13.101.208
baidu.com.		86400	IN	NS	ns4.baidu.com.
baidu.com.		86400	IN	NS	ns7.baidu.com.
baidu.com.		86400	IN	NS	dns.baidu.com.
baidu.com.		86400	IN	NS	ns3.baidu.com.
baidu.com.		86400	IN	NS	ns2.baidu.com.

;; ADDITIONAL SECTION:
mx1.baidu.com.		300	IN	A	61.135.163.61
jpmx.baidu.com.		7200	IN	A	61.208.132.13

;; Query time: 252 msec
;; SERVER: 75.127.97.7#53(75.127.97.7)
;; WHEN: Wed Sep 20 19:56:06 2017
;; MSG SIZE  rcvd: 509
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old Today, 06:35 PM   #122
Barry-xlovecam
It's 42
 
Barry-xlovecam's Avatar
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 17,035
Quote:
Originally Posted by porn-update View Post
I was thinking of installing Fail2ban, but I saw that it reads Apache errors.

But I think I didn't understand something because:
Code:
[email protected]:~# tail -f error_log|fgrep '[rewrite:'
tail: cannot open ‘error_log’ for reading: No such file or directory
[email protected]:~# LogLevel alert rewrite:trace3
LogLevel: command not found

What am I missing? How should I use this?
Sorry, long day -- that log's location /path/to/THAT/error_log
full path to THAT log not the domain config log.

Also pipe into the grep
$ tac <path/to/file/error.log> | egrep -i 'this|or|that' |less
__________________
Vive la résistance -- Carpe diem

"If you only knew the power of the dark side." ...Darth Vader
Sk.why.pe: barry_555_5 -- ICQ: three1896three617
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
vps, centos, cwp, thinking, line, free, command, software, advice, direction, cpanel, memcache, guides, correct, reverse, varnish, tool, litespeed, proxy, initial, acpu, opcache, apache, web, past
Thread Tools




©2000-, AVN Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.