#HTTP_COOKIE
Explore tagged Tumblr posts
reflectivearchive · 3 months ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Alien Evolution Studio
Classic Logo Board Shorts - (Blue & Red)
Source: https://www.alienevolutionstudio.com/products?query=AES%20CLASSIC%20LOGO%20BOARD%20SHORTS&http_cookie=2e9d8983f1dc4f1e8a5e02eb04b8a654
0 notes
learnopenerp · 5 years ago
Link
Odoo httprequest, HTTP Request, HTTP_COOKIE, HTTP_X_REAL_IP, REMOTE_ADDR, SERVER_PORT, REMOTE_PORT, HTTP_REFERER, HTTP_USER_AGENT, REQUEST_METHOD HTTP
0 notes
sololinuxes · 6 years ago
Text
Generador online de .htaccess
Tumblr media
Generador online de .htaccess (htaccess online generator). Revisando los repositorios de Github, encontré un generador online de .htaccess que quiero compartir con los lectores de "Sololinux". Al ver el código, me sorprendió el buen diseño y trabajo que el amigo Emirodgar había realizado. El resultado final está muy elaborado, y cuenta con excelentes características, que pasamos a enumerar: Opciones de acceso Establece el dominio principal. Redireccionamiento a www. https redirect. Opciones de configuración Página de acceso predeterminada. Juego de caracteres predeterminado. Forzar la descarga de un tipo de archivo. Limitar el tamaño del archivo a subir. Configurar el correo del administrador. Actuación Activar la compresión Gzip. Habilitar los encabezados de Keep-Alive. Vencimiento de los encabezados (headers). Páginas de error personalizadas Error 404 Error 500 Opciones de seguridad Bloquear la navegación por el directorio. Deshabilitar la ejecución de CGI. Oculta la información sensible del servidor. Evitar que inserten tus páginas en otros sitios web. Deshabilita la firma del servidor. Bloquea los robots de SPAM más conocidos. Evita el acceso ilegal o inseguro. No permitir la ejecución de scripts (define las extensiones). Deniega los métodos de solicitud que definas. No permite el hotlinking. Antes de realizar cualquier modificación en tu archivo htaccess, te recomiendo que hagas una copia de seguridad. Es algo típico que por cualquier error en el archivo, el servidor lance un error 500.
Tumblr media
  Generador online de .htaccess
Como considero que es una utilidad altamente recomendable, la hemos subido a sololinux, para que puedas generar tu archivo htaccess, lo encontraras en la siguiente url. htaccess online generator Si prefieres tener tu propio generador online de .htaccess, es tan simple como crear un archivo html y copiar y pegar lo siguiente. Free .htaccess Online Generator body { padding-top: 2rem; padding-bottom: 2rem; } h3 { margin-top: 2rem; } h2 { font-size: 1.45rem; margin-top: 2rem; margin-bottom: 2rem; } form { padding-left:10px; } .row { margin-bottom: 1rem; } .row .row { margin-top: 1rem; margin-bottom: 0; } { padding-top: 1rem; padding-bottom: 1rem; background-color: rgba(86,61,124,.15); border: 1px solid rgba(86,61,124,.2); } hr { margin-top: 2rem; margin-bottom: 2rem; } .lead, small { padding-left:10px; } footer {padding: 2rem;} (function(w,d,s,l,i){w=w||;w.push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s), j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-K8V5396');
Free .htaccess Generator
Simple, free and online. Create, without error, your .htaccess file. Instructions Fill the options and push "generate" button in order to get your .htaccess file. The copy and paste the content into your .htaccess file. Remember, this file must be in the root of your site.
Public access options
Domain Example: domain.com (don't use www or http) Redirect http to https (SSL) Force www access (default is non www)
Config website
Prevent 404 errors for non-existing folders Default access page Example: index.php index.html (default is index.html) Default web charset Example: UTF-8 Force download (filetype) Example: .avi .pdf .mp4 Limit upload file size Example: 2147483647 (2GB) Administrator email Example: [email protected]
Performance
Enable Gzip compression Enable Keep-Alive header Expires Headers Example: 29030400 Time helper 30 min 1 hour 12 hours 1 day 1 week 1 month 1 year
Custom errors pages
Error 404 Example: error404.html Error 500 Example: error500.html
Security
Prevent directory navigation Disable CGI execution Hide information about web server technology Do not allow pages to be framed Disable server sign Block SPAM bots Prevent illegal or unsafe access (restrictive mode) Disallow script execution Example: .php .jsp .cgi Deny requests methods Example: get|post|put Prevent hotlinking Example: https://mydomain.com/mylogo.png Generate .htaccess Created by Emirodgar - Free htaccess generator $('#generateHtaccess').click( function() { var htaccess = ''; var domain = $('#htDomain').val(); var domainReg = domain.replace(/\./g,'\\.'); if (domainReg =='') domainReg = 'CHANGEDOMAIN\\.com'; var param = paramHttps = htaccessIllegal = htaccessSpam = ''; var rewrite = false; $('#htaccessFinal').val(''); htaccess += '\nRewriteEngine On'; if ($('#htHttps').is(":checked")) { paramHttps = 's'; htaccess += "\n\n#Redirect to SSL version"+ "\nRewriteCond %{HTTPS} off" + "\nRewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}"; } if ($('#htWww').is(":checked")) { htaccess += "\n\n#Redirect to www version"+ "\nRewriteCond %{HTTP_HOST} !^www\.(.*)$ " + "\nRewriteRule ^(.*)$ http"+paramHttps+"://www.%{HTTP_HOST}/$1"; } else { $param = 'www.'; htaccess += "\n\n#Redirect to non www version"+ "\nRewriteCond %{HTTP_HOST} ^www\.(.*)$ " + "\nRewriteRule ^(.*)$ http"+paramHttps+"://%1/$1 "; } //Config if ($('#ht404Redirect').is(":checked")) { htaccess += "\n\n#Prevent 404 en non-existing folders"+ "\nOptions -MultiViews"; } var htDefaultPage = $('#htDefaultPage').val(); if(htDefaultPage!=''){ htaccess += "\n\n#Default page"+ "\nDirectoryIndex "+htDefaultPage; } var htAdminEmail = $('#htAdminEmail').val(); if(htAdminEmail!=''){ htaccess += "\n\n#Default contact email"+ "\nSetEnv SERVER_ADMIN "+htAdminEmail; } var htForceDownload = $('#htForceDownload').val(); if(htForceDownload!=''){ htaccess += "\n\n#Force download"+ "\nAddType application/octet-stream "+htForceDownload; } var htWebCharset = $('#htWebCharset').val(); if(htWebCharset!=''){ htaccess += "\n\n#Default charset"+ "\nAddDefaultCharset "+htWebCharset; } var htFileSize = $('#htFileSize').val(); if(htFileSize!=''){ htaccess += "\n\n#Limit upload file size"+ "\nLimitRequestBody "+htFileSize; } //Performance if ($('#htGzip').is(":checked")) { htaccess += "\n\n#Gzip compression"+ "\n"+ "\n mod_gzip_on Yes"+ "\n mod_gzip_dechunk Yes"+ "\n mod_gzip_item_include file .(html?|txt|css|js|php|pl)$"+ "\n mod_gzip_item_include handler ^cgi-script$"+ "\n mod_gzip_item_include mime ^text/.*"+ "\n mod_gzip_item_include mime ^application/x-javascript.*"+ "\n mod_gzip_item_exclude mime ^image/.*"+ "\n mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*"+ "\n"; } if ($('#htKeepAlive').is(":checked")) { htaccess += "\n\n#Enable Keep-Alive Headers"+ "\n"+ "\n Header set Connection Keep-Alive"+ "\n"; } var htExpiresHeaders = $('#htExpiresHeaders').val(); var htExpiresHeadersFormat = $('#htExpiresHeadersFormat').val(); if(htExpiresHeaders!=''){ htaccess += "\n\n#Set Expires Headers"+ '\n'+ "\n ExpiresDefault A"+htExpiresHeaders+ "\n"; } //Error var htCustomError404 = $('#htCustomError404').val(); if(htCustomError404!=''){ htaccess += "\n\n#Default 404 error"+ "\ErrorDocument 404 "+htCustomError404; } var htCustomError500 = $('#htCustomError500').val(); if(htCustomError500!=''){ htaccess += "\n\n#Default 500 error"+ "\nErrorDocument 500 "+htCustomError404; } //Security if ($('#htDirectory').is(":checked")) { htaccess += "\n\n#Prevent directory navigation"+ "\nOptions All -Indexes"; } if ($('#htDisableCgi').is(":checked")) { htaccess += "\n\n#Disable CGI"+ "\nOptions -ExecCGI"; } if ($('#htDisableTech').is(":checked")) { htaccess += "\n\n#Hide PoweredBy"+ "\nHeader unset X-Powered-By"; } if ($('#htDisableFrame').is(":checked")) { htaccess += "\n\n#Do not allow pages to be framed"+ "\nHeader set X-Frame-Options SAMEORIGIN"; } if ($('#htDisableSign').is(":checked")) { htaccess += "\n\n#Disable server sign"+ "\nServerSignature Off"; } var htDisallowScript = $('#htDisallowScript').val(); if(htDisallowScript!=''){ htaccess += "\n\n#Disallow scripts execution"+ "\nAddHandler " +htDisallowScript; } var htDenyRequests = $('#htDenyRequests').val(); if(htDenyRequests!=''){ htaccess += "\n\n#Deny request method"+ "\nRewriteCond %{REQUEST_METHOD} !^("+htDenyRequests.toUpperCase()+")"+ "\nRewriteRule .? - "; } var htHotlinking = $('#htHotlinking').val(); if(htHotlinking!=''){ htaccess += "\n\n#Prevent hotlinking"+ "\nRewriteCond %{HTTP_REFERER} !^$"+ "\nRewriteCond %{HTTP_REFERER} !^http://(www\.)?"+domainReg+"/.*$ "+ "\nRewriteRule \.(gif|jpg|swf|flv|png)$ "+htHotlinking+" "; } if ($('#htSpamBots').is(":checked")) { rewrite= true; htaccessSpam = "\n\n #Block Spam Bots"+ "\n RewriteCond %{HTTP_USER_AGENT} ^(aesop_com_spiderman|alexibot|backweb|bandit|batchftp|bigfoot) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(black.?hole|blackwidow|blowfish|botalot|buddy|builtbottough|bullseye) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(cheesebot|cherrypicker|chinaclaw|collector|copier|copyrightcheck) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(cosmos|crescent|curl|custo|da|diibot|disco|dittospyder|dragonfly) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(drip|easydl|ebingbong|ecatch|eirgrabber|emailcollector|emailsiphon) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(emailwolf|erocrawler|exabot|eyenetie|filehound|flashget|flunky) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(frontpage|getright|getweb|go.?zilla|go-ahead-got-it|gotit|grabnet) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(grafula|harvest|hloader|hmview|httplib|httrack|humanlinks|ilsebot) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(infonavirobot|infotekies|intelliseek|interget|iria|jennybot|jetcar) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(joc|justview|jyxobot|kenjin|keyword|larbin|leechftp|lexibot|lftp|libweb) " + "\n RewriteCond %{HTTP_USER_AGENT} ^web(zip|emaile|enhancer|fetch|go.?is|auto|bandit|clip|copier|master|reaper|sauger|site.?quester|whack) " + "\n RewriteCond %{HTTP_USER_AGENT} ^.*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures).*$ " + "\n RewriteRule . - "; } if ($('#htIllegal').is(":checked")) { rewrite= true; htaccessIllegal = "\n\n #Block illegal or unsafe access"+ "\n RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) " + "\n RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* " + "\n RewriteCond %{HTTP_COOKIE} ^.*(|'|'|%0A|%0D|%27|%3C|%3E|%00).* " + "\n RewriteCond %{HTTP_USER_AGENT} ^.*(|'|'|%0A|%0D|%27|%3C|%3E|%00).* " + "\n RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* " + "\n RewriteCond %{QUERY_STRING} ^.*(|'|'|%0A|%0D|%27|%3C|%3E|%00).* " + "\n RewriteRule (.*) - "; } if (rewrite == true){ htaccess += "\n\n#Mod Rewrite"+ "\n"+ "\n RewriteEngine On"+ "\n Options +FollowSymlinks"+ "\n RewriteBase /"+ htaccessSpam+ htaccessIllegal+ "\n"; } $('#htaccessFinal').val(htaccess); } ); Guardas el *.html y lo ejecutas en tu navegador web favorito. Ejemplo...
Tumblr media
  Si crees que esta herramienta es útil, compártela.   Read the full article
0 notes
martseminar2018 · 7 years ago
Photo
Tumblr media
Above image is from Sep 24, 2018 showing trackers this service blocks.
2013 article that counted 1300 trackers at the time and what opting out actually does/did.
https://www.itworld.com/article/2832940/it-management/web-trackers-are-totally-out-of-control.html
Tumblr media
What is a cookie:
https://en.wikipedia.org/wiki/HTTP_cookie#IP_address
0 notes
just4programmers · 7 years ago
Text
Python CGI Programming
Python Programming language is broadly used by developers to create standalone, desktop, enterprise and web applications these days. Here in this article, I’m going to cover trending CGI programming in python. If you have just marked your presence in the python programming universe, then I believe you should go for Simplilearn’s Python Training accessible anytime over the internet. Here, you’ll learn about developing simple to complex python based applications with briefly described basics to advanced terms used in programming. It will also make you develop the python programming based game- flappy bird clone.
Python CGI Programming
CGI (Common Gateway Interface), is a group of standards for defining the data exchange among server and customized scripts. The CGI specifications are managed by NCSA.
What is Common Gateway Interface?
CGI is a set of standard designed for external gateway programs. It assists them to connect through the servers such as HTTP server. The latest version available is CGI 1.1 and CGI 1.2 is under development.
Web Browsing
Allow me to explain the concept of CGI in an elaborative way. Let’s check out what happens when you click on a particular hyperlink for browsing a URL:
The browser connects with HTTP web server by sending a request demanding for the URL, that is, filename.
Web server parses the URL and searches for the name of the file. If it recognise that file, sends it back to the main client such as browser. And, if not, an error message will be indicated, saying you requested a wrong file.
Browser collects the response from the web server. It either displays the error message or collected file to the client.
Though, it is easy to create an HTTP server so that server can directly return output to the browser made request by executing the file instead of sending file. This feature is known as Common Gateway Interface or CGI. The programs written for it are known as CGI scripts. If Python is not your primary programming language, don’t worry, you can write CGI programs in PERL, C, C++, Shell etc.
Web Server Configuration
Talking more about the CGI programming always ensure that your web server supports CGI. Also, it is capable of handling CGI scripts. A pre-configured directory will be stored in the HTTP server for running all the CGI scripts. The name of this directory is CGI directory. The convention path will be /var/www/cgi-bin. CGI files support .cgi extension. Best part is you can also keep your python .py extension files in this folder.
The Linux server executes these scripts in cgi-bin directory as /var/www. For defining any specific directory to execute your script, you can make following changes in httpd.conf file:
<Directory "/usr/var/www/cgi-bin"> AllowOverride None Options ExecCGI +MultiViews Require all granted </Directory> <Directory "/var/www/cgi-bin"> Options All </Directory>
Now, you got a web server and you are free to execute any program written in C, Perl etc.
Writing CGI Program
Let’s start by writing a simple python script which will be pointing to a CGI script known as firstpgm.py. This file is stored in the folder /var/www/cgi-bin. Now, before execution, make sure to change permission by using Unix command chmod for execution.
Chmod 755 firstpgm.py
File:
#!/usr/bin/python print "content-type: text/html/r/n/r/n" print '<html>' print '<head>' print '<title> Hi all- first program</title>' print '</head>' print '<body>' print '<h3> Yo- successfully executed my program</h3>' print '</body>' print '</html>'
On execution, an output will be shown:
Yo- successfully executed my program
HTTP Header
In the above program the content-type: text/html\r\n\r\n represents a HTTP header. It is sent to the browser for recognising content.
Various HTTP-headers are: Content-type, Location: URL, Set Cookie: String, Content-Length: N, Last-Modified: Date, Expires: Date.
Environment Variables in CGI
The environment variables are accessible from programs. Few environment variables broadly used in the programming are following:
CONTENT_TYPE: It represents the data type of the content sent by client to the server.
HTTP_COOKIE: key and value pair cookie setup.
PATH_INFO: represents the CGI script path.
REMOTE_ADDR: used for authentication. It displays the IP   of the remote host.
REQUEST_METHOD: methods used for requests like GET and POST.
REMOTE_HOST: It displays the hostname.
SCRIPT_NAME: It displays the script name.
SERVER_NAME: hostname of server.
SERVER_SOFTWARE: name and version of software running over the server.
QUERY_STRING: It takes the URL information. This information is taken by GET method.
You can also check the list of environment variables by writing script:
#!/usr/bin/python import os print "Content-type: text/html\r\n\r\n"; print "<font size=+4>Environment</font><\br>"; for param in os.environ.keys(): print "<b>%20s</b>: %s<\br>" % (param, os.environ[param])
Final Words
In this article, I’ve covered the key pillar of the backend programing-CGI. I hope now you’ll able to develop your application in an effective manner. Feel free to ask any question..!!
The post Python CGI Programming appeared first on The Crazy Programmer.
0 notes
worldhackernews-blog · 7 years ago
Text
Danske bank fixes several vulnerabilities that could allow hackers to get into bank accounts
New Post has been published on https://worldhackernews.com/danske-bank-fixes-several-vulnerabilities-that-could-allow-hackers-to-get-into-bank-accounts/
Danske bank fixes several vulnerabilities that could allow hackers to get into bank accounts
Most of us prefer to keep money at our bank accounts than to keep at home as we believe that banks are safer in comparison to our homes. But, you must get panicked, once you read a blog post by Sijmen Ruwhof, Freelance IT Security Consultant and an Ethical Hacker.
He has published a bank review entitled “How I could hack internet bank accounts of Danish largest bank in a few minutes”  in which he revealed that any hacker could easily get into the website of Danske Bank, one of the largest banks of Denmark, and get access to the users accounts.
His in-depth technical post explains the extent to which Danske Bank is vulnerable to hacking.
He discovered the vulnerability in August when he got intrigued with the idea of testing Bank’s security while interacting with a group of Danish hackers at the Chaos Communication Camp (CCC), near Berlin.
During the interacting program, security experts and Whitehat hackers were disappointed with the terrible security implementations adopted by many Danish Banks.
“I opened up the Danske Bank’s website and was curious to see how the HTML code looked like, so opened the code of the customer login screen of the banking environment. I strolled thru the code to get a grasp of the technology used,” the security researcher wrote in the blog.
Then he saw JavaScript comments that seemed to contain internal server information. Not just a few variables, but quite a lot of confidential data.
“It was in URL encoded format, so I decoded it right away. Really wondering what kind of secrets it contained,” he added. I was shocked. Is this happening for real? In less than a minute on their web site, this is just the HTML code of the login screen, one of the most visited pages of Danske Bank’s web site.”
The researcher said that he could see IP address of a probable customer via variable HTTP_CLIENTIP while visiting Danske Bank’s website. Similarly, HTTP_USER_AGENT contains an operating system and web browser details.
He warned that variable HTTP_COOKIE was visible and full of information; credentials of a customer could be hijacked in a very few time.
According to the researcher, Danske Bank doesn’t use a secure HTTPS connection to transport customer banking traffic; as variable HTTPS was OFF and SERVER_PORT carried value 80. The bank is still using COBOL code on their backend; for (Customer Information Control System) CICS and Database handling.
However, the good news is bank has patched all the vulnerabilities only after the researcher had uploaded his findings on his blog.
Source link
0 notes
lamkinhdesigner · 8 years ago
Text
Thiết lập plugin Cache dành riêng cho woocommerce
Như chúng ta đã biết, đã có rất nhiều các bài viết hướng dẫn cài plugin để hỗ trợ tăng tốc độ load cho wordpress. Bài viết hôm nay lamkinhdesigner sẽ hưỡng dẫn các bạn cách cài đặt plugin Cache dành riêng cho Woocommerce một cách chính xác nhất, để không gặp những lỗi không nên có khi chúng ta làm việc với website bán hàng như: trang như giỏ hàng, thanh toán,…sẽ bị lưu cache nên khách gặp khó khăn trong việc sử dụng.
Vì vậy tốt hơn hết, chúng ta hãy thêm danh sách những trang đặc biệt đó vào danh sách không lưu cache trong các plugin. Nếu bạn vẫn chưa biết làm thế nào thì bài hướng dẫn này sẽ giúp bạn.
Đối với WP Super Cache
Bạn vào Performence -> Page Cache và tìm đến phần “Never cache the following pages” rồi điền đường dẫn các trang cần loại bỏ lưu cache vào.
Sau đó ấn Save Strings để lưu cài đặt.
Đối với W3 Total Cache
Bạn vào Performence -> Page Cache và tìm đến phần “Never cache the following pages” rồi điền đường dẫn các trang cần loại bỏ lưu cache vào.
  Đối với Zen Cache
Bạn tìm tới mục URI Exclusion Patterns và khai báo vào như hình dưới.
Đối với WP-FFPC
Bạn vào mục Cache exceptions và điền vào phần “Don’t cache following URL paths – use with caution!“.
Đối với máy chủ sử dụng EasyEngine
Nếu bạn đang dùng EasyEngine thì có thể sẽ cần phải sửa tập tin cấu hình cache mà bạn đang sử dụng. Ví dụ bạn sử dụng loại thiết lập --wpfc thì hãy vào thư mục /etc/nginx/common và tìm tập tin wpfc.conf và wpfc-hhvm.conf rồi thêm đoạn sau vào trên location / {.
  01
02
03
04
05
06
07
08
09
10
11
12
13
14
# Skip cache on WooCommerce pages
if ($request_uri ~* "/store.*|/cart.*|/my-account.*|/checkout.*|/addons.*") {
 set $skip_cache 1;
}
# Skip cache for WooCommerce query string
if ( $arg_add-to-cart != "" ) {
 set $skip_cache 1;
}
# Skip cache when WooCommerce cart is not empty
if ( $cookie_woocommerce_items_in_cart != "0" ) {
 set $skip_cache 1;
}
Nếu chèn đúng thì nó sẽ trông giống thế này.
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
set $skip_cache 0;
# POST requests and URL with a query string should always go to php
if ($request_method = POST) {
 set $skip_cache 1;
}
if ($query_string != "") {
 set $skip_cache 1;
}
# Don't cache URL containing the following segments
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap$
 set $skip_cache 1;
}
# Don't use the cache for logged in users or recent commenter
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_n$
 set $skip_cache 1;
}
# Skip cache on WooCommerce pages
if ($request_uri ~* "/store.*|/cart.*|/my-account.*|/checkout.*|/addons.*") {
 set $skip_cache 1;
}
# Skip cache for WooCommerce query string
if ( $arg_add-to-cart != "" ) {
 set $skip_cache 1;
}
# Skip cache when WooCommerce cart is not empty
if ( $cookie_woocommerce_items_in_cart != "0" ) {
 set $skip_cache 1;
}
# Use cached or actual file if they exists, Otherwise pass request to WordPress
location / {
 try_files $uri $uri/ /index.php?$args;
}
location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ {
 try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$$
}
location ~ \.php$ {
 set $rt_session "";
 if ($http_cookie ~* "wc_session_cookie_[^=]*=([^%]+)%7C") {
 set $rt_session wc_session_cookie_$1;
 }
 if ($skip_cache = 0 ) {
 more_clear_headers "Set-Cookie*";
 set $rt_session "";
 }
 fastcgi_cache_key "$scheme$request_method$host$request_uri$rt_session";
 try_files $uri =404;
 include fastcgi_params;
 fastcgi_pass php;
 fastcgi_cache_bypass $skip_cache;
 fastcgi_no_cache $skip_cache;
 fastcgi_cache WORDPRESS;
}
location ~ /purge(/.*) {
 fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
}
Sau đó nhớ khởi động lại NGINX nhé.
01
sudo service nginx restart
Bên trên là hướng dẫn cách cài đặt plugin Cache dành riêng cho woocommerce, nếu các bạn đang dùng woocommerce và dùng kèm theo các plugin trên các bạn nên tiến hành cài đặt ngay sau khi đọc bài viết của lamkinhdesigner. Chúc các bạn thành công!
Tham khảo bài nguyên mẫu tại đây : Thiết lập plugin Cache dành riêng cho woocommerce
0 notes
Text
VPN Master Privacy Policy
Privacy Policy
General We take your privacy seriously and below explained what we may collect from you, how we store and how we use this information. Please read the following carefully to understand our views and practices regarding your personal data and how we, as data controller (as defined by the Data Protection Act ("DPA" 1998) of your personal data that you provide to us, will treat it. Using our services and software you are agree to our "Terms and Conditions" and "Privacy Policy" described below. What we monitor We do not monitor your traffic. The only thing we monitor if the IPs you are using to enter our servers are not blacklisted in respected Black lists databases, like spamhaus.org. This monitoring is provided for your and our security. Cookies You can find more information what is cookie here: http://en.wikipedia.org/wiki/HTTP_cookie We do not use own Cookies, but Cookies might be used by the third parties that links from our app lead to. By clicking on to third party website you are consenting to their use of cookies. Where we keep your information We keep all information on highly secured servers based in United Kingdom and USA. All Information might be transferred to other servers we could use and we will take reasonably care with these possible transfers. How the Information is transferred When you setup out app on mobile device you are installing security key and all information transmitted encoded. Our service allow you to go to the Internet and even connect to public networks without the fair that information could be stolen. It is also allowed you to use VPN tunnel to go to the Internet using preferred Servers and Geo locations. To whom and how we can disclose information: We may disclose information we collect from you: To the law enforcement organisations, if we obliged to, and Information required in suspect of breach of the law. To the employees and Technical specialist working with us. We have procedures and agreements in place that all information is strictly confidential.
0 notes
sololinuxes · 6 years ago
Text
Generador online de .htaccess
Tumblr media
Generador online de .htaccess (htaccess online generator). Revisando los repositorios de Github, encontré un generador online de .htaccess que quiero compartir con los lectores de "Sololinux". Al ver el código, me sorprendió el buen diseño y trabajo que el amigo Emirodgar había realizado. El resultado final está muy elaborado, y cuenta con excelentes características, que pasamos a enumerar: Opciones de acceso Establece el dominio principal. Redireccionamiento a www. https redirect. Opciones de configuración Página de acceso predeterminada. Juego de caracteres predeterminado. Forzar la descarga de un tipo de archivo. Limitar el tamaño del archivo a subir. Configurar el correo del administrador. Actuación Activar la compresión Gzip. Habilitar los encabezados de Keep-Alive. Vencimiento de los encabezados (headers). Páginas de error personalizadas Error 404 Error 500 Opciones de seguridad Bloquear la navegación por el directorio. Deshabilitar la ejecución de CGI. Oculta la información sensible del servidor. Evitar que inserten tus páginas en otros sitios web. Deshabilita la firma del servidor. Bloquea los robots de SPAM más conocidos. Evita el acceso ilegal o inseguro. No permitir la ejecución de scripts (define las extensiones). Deniega los métodos de solicitud que definas. No permite el hotlinking. Antes de realizar cualquier modificación en tu archivo htaccess, te recomiendo que hagas una copia de seguridad. Es algo típico que por cualquier error en el archivo, el servidor lance un error 500.
Tumblr media
  Generador online de .htaccess
Como considero que es una utilidad altamente recomendable, la hemos subido a sololinux, para que puedas generar tu archivo htaccess, lo encontraras en la siguiente url. htaccess online generator Si prefieres tener tu propio generador online de .htaccess, es tan simple como crear un archivo html y copiar y pegar lo siguiente. Free .htaccess Online Generator body { padding-top: 2rem; padding-bottom: 2rem; } h3 { margin-top: 2rem; } h2 { font-size: 1.45rem; margin-top: 2rem; margin-bottom: 2rem; } form { padding-left:10px; } .row { margin-bottom: 1rem; } .row .row { margin-top: 1rem; margin-bottom: 0; } { padding-top: 1rem; padding-bottom: 1rem; background-color: rgba(86,61,124,.15); border: 1px solid rgba(86,61,124,.2); } hr { margin-top: 2rem; margin-bottom: 2rem; } .lead, small { padding-left:10px; } footer {padding: 2rem;} (function(w,d,s,l,i){w=w||;w.push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s), j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-K8V5396');
Free .htaccess Generator
Simple, free and online. Create, without error, your .htaccess file. Instructions Fill the options and push "generate" button in order to get your .htaccess file. The copy and paste the content into your .htaccess file. Remember, this file must be in the root of your site.
Public access options
Domain Example: domain.com (don't use www or http) Redirect http to https (SSL) Force www access (default is non www)
Config website
Prevent 404 errors for non-existing folders Default access page Example: index.php index.html (default is index.html) Default web charset Example: UTF-8 Force download (filetype) Example: .avi .pdf .mp4 Limit upload file size Example: 2147483647 (2GB) Administrator email Example: [email protected]
Performance
Enable Gzip compression Enable Keep-Alive header Expires Headers Example: 29030400 Time helper 30 min 1 hour 12 hours 1 day 1 week 1 month 1 year
Custom errors pages
Error 404 Example: error404.html Error 500 Example: error500.html
Security
Prevent directory navigation Disable CGI execution Hide information about web server technology Do not allow pages to be framed Disable server sign Block SPAM bots Prevent illegal or unsafe access (restrictive mode) Disallow script execution Example: .php .jsp .cgi Deny requests methods Example: get|post|put Prevent hotlinking Example: https://mydomain.com/mylogo.png Generate .htaccess Created by Emirodgar - Free htaccess generator $('#generateHtaccess').click( function() { var htaccess = ''; var domain = $('#htDomain').val(); var domainReg = domain.replace(/\./g,'\\.'); if (domainReg =='') domainReg = 'CHANGEDOMAIN\\.com'; var param = paramHttps = htaccessIllegal = htaccessSpam = ''; var rewrite = false; $('#htaccessFinal').val(''); htaccess += '\nRewriteEngine On'; if ($('#htHttps').is(":checked")) { paramHttps = 's'; htaccess += "\n\n#Redirect to SSL version"+ "\nRewriteCond %{HTTPS} off" + "\nRewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}"; } if ($('#htWww').is(":checked")) { htaccess += "\n\n#Redirect to www version"+ "\nRewriteCond %{HTTP_HOST} !^www\.(.*)$ " + "\nRewriteRule ^(.*)$ http"+paramHttps+"://www.%{HTTP_HOST}/$1"; } else { $param = 'www.'; htaccess += "\n\n#Redirect to non www version"+ "\nRewriteCond %{HTTP_HOST} ^www\.(.*)$ " + "\nRewriteRule ^(.*)$ http"+paramHttps+"://%1/$1 "; } //Config if ($('#ht404Redirect').is(":checked")) { htaccess += "\n\n#Prevent 404 en non-existing folders"+ "\nOptions -MultiViews"; } var htDefaultPage = $('#htDefaultPage').val(); if(htDefaultPage!=''){ htaccess += "\n\n#Default page"+ "\nDirectoryIndex "+htDefaultPage; } var htAdminEmail = $('#htAdminEmail').val(); if(htAdminEmail!=''){ htaccess += "\n\n#Default contact email"+ "\nSetEnv SERVER_ADMIN "+htAdminEmail; } var htForceDownload = $('#htForceDownload').val(); if(htForceDownload!=''){ htaccess += "\n\n#Force download"+ "\nAddType application/octet-stream "+htForceDownload; } var htWebCharset = $('#htWebCharset').val(); if(htWebCharset!=''){ htaccess += "\n\n#Default charset"+ "\nAddDefaultCharset "+htWebCharset; } var htFileSize = $('#htFileSize').val(); if(htFileSize!=''){ htaccess += "\n\n#Limit upload file size"+ "\nLimitRequestBody "+htFileSize; } //Performance if ($('#htGzip').is(":checked")) { htaccess += "\n\n#Gzip compression"+ "\n"+ "\n mod_gzip_on Yes"+ "\n mod_gzip_dechunk Yes"+ "\n mod_gzip_item_include file .(html?|txt|css|js|php|pl)$"+ "\n mod_gzip_item_include handler ^cgi-script$"+ "\n mod_gzip_item_include mime ^text/.*"+ "\n mod_gzip_item_include mime ^application/x-javascript.*"+ "\n mod_gzip_item_exclude mime ^image/.*"+ "\n mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*"+ "\n"; } if ($('#htKeepAlive').is(":checked")) { htaccess += "\n\n#Enable Keep-Alive Headers"+ "\n"+ "\n Header set Connection Keep-Alive"+ "\n"; } var htExpiresHeaders = $('#htExpiresHeaders').val(); var htExpiresHeadersFormat = $('#htExpiresHeadersFormat').val(); if(htExpiresHeaders!=''){ htaccess += "\n\n#Set Expires Headers"+ '\n'+ "\n ExpiresDefault A"+htExpiresHeaders+ "\n"; } //Error var htCustomError404 = $('#htCustomError404').val(); if(htCustomError404!=''){ htaccess += "\n\n#Default 404 error"+ "\ErrorDocument 404 "+htCustomError404; } var htCustomError500 = $('#htCustomError500').val(); if(htCustomError500!=''){ htaccess += "\n\n#Default 500 error"+ "\nErrorDocument 500 "+htCustomError404; } //Security if ($('#htDirectory').is(":checked")) { htaccess += "\n\n#Prevent directory navigation"+ "\nOptions All -Indexes"; } if ($('#htDisableCgi').is(":checked")) { htaccess += "\n\n#Disable CGI"+ "\nOptions -ExecCGI"; } if ($('#htDisableTech').is(":checked")) { htaccess += "\n\n#Hide PoweredBy"+ "\nHeader unset X-Powered-By"; } if ($('#htDisableFrame').is(":checked")) { htaccess += "\n\n#Do not allow pages to be framed"+ "\nHeader set X-Frame-Options SAMEORIGIN"; } if ($('#htDisableSign').is(":checked")) { htaccess += "\n\n#Disable server sign"+ "\nServerSignature Off"; } var htDisallowScript = $('#htDisallowScript').val(); if(htDisallowScript!=''){ htaccess += "\n\n#Disallow scripts execution"+ "\nAddHandler " +htDisallowScript; } var htDenyRequests = $('#htDenyRequests').val(); if(htDenyRequests!=''){ htaccess += "\n\n#Deny request method"+ "\nRewriteCond %{REQUEST_METHOD} !^("+htDenyRequests.toUpperCase()+")"+ "\nRewriteRule .? - "; } var htHotlinking = $('#htHotlinking').val(); if(htHotlinking!=''){ htaccess += "\n\n#Prevent hotlinking"+ "\nRewriteCond %{HTTP_REFERER} !^$"+ "\nRewriteCond %{HTTP_REFERER} !^http://(www\.)?"+domainReg+"/.*$ "+ "\nRewriteRule \.(gif|jpg|swf|flv|png)$ "+htHotlinking+" "; } if ($('#htSpamBots').is(":checked")) { rewrite= true; htaccessSpam = "\n\n #Block Spam Bots"+ "\n RewriteCond %{HTTP_USER_AGENT} ^(aesop_com_spiderman|alexibot|backweb|bandit|batchftp|bigfoot) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(black.?hole|blackwidow|blowfish|botalot|buddy|builtbottough|bullseye) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(cheesebot|cherrypicker|chinaclaw|collector|copier|copyrightcheck) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(cosmos|crescent|curl|custo|da|diibot|disco|dittospyder|dragonfly) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(drip|easydl|ebingbong|ecatch|eirgrabber|emailcollector|emailsiphon) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(emailwolf|erocrawler|exabot|eyenetie|filehound|flashget|flunky) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(frontpage|getright|getweb|go.?zilla|go-ahead-got-it|gotit|grabnet) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(grafula|harvest|hloader|hmview|httplib|httrack|humanlinks|ilsebot) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(infonavirobot|infotekies|intelliseek|interget|iria|jennybot|jetcar) " + "\n RewriteCond %{HTTP_USER_AGENT} ^(joc|justview|jyxobot|kenjin|keyword|larbin|leechftp|lexibot|lftp|libweb) " + "\n RewriteCond %{HTTP_USER_AGENT} ^web(zip|emaile|enhancer|fetch|go.?is|auto|bandit|clip|copier|master|reaper|sauger|site.?quester|whack) " + "\n RewriteCond %{HTTP_USER_AGENT} ^.*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures).*$ " + "\n RewriteRule . - "; } if ($('#htIllegal').is(":checked")) { rewrite= true; htaccessIllegal = "\n\n #Block illegal or unsafe access"+ "\n RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) " + "\n RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* " + "\n RewriteCond %{HTTP_COOKIE} ^.*(|'|'|%0A|%0D|%27|%3C|%3E|%00).* " + "\n RewriteCond %{HTTP_USER_AGENT} ^.*(|'|'|%0A|%0D|%27|%3C|%3E|%00).* " + "\n RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* " + "\n RewriteCond %{QUERY_STRING} ^.*(|'|'|%0A|%0D|%27|%3C|%3E|%00).* " + "\n RewriteRule (.*) - "; } if (rewrite == true){ htaccess += "\n\n#Mod Rewrite"+ "\n"+ "\n RewriteEngine On"+ "\n Options +FollowSymlinks"+ "\n RewriteBase /"+ htaccessSpam+ htaccessIllegal+ "\n"; } $('#htaccessFinal').val(htaccess); } ); Guardas el *.html y lo ejecutas en tu navegador web favorito. Ejemplo...
Tumblr media
  Si crees que esta herramienta es útil, compártela.   Read the full article
0 notes