hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Need help with NGINX/Roboo/Perl syntax
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Need help with NGINX/Roboo/Perl syntax

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-09-2012, 11:40 AM
infinitnet infinitnet is online now
Web Hosting Evangelist
 
Join Date: Dec 2011
Location: /etc/sysconfig
Posts: 453
Unhappy

Need help with NGINX/Roboo/Perl syntax


Hello WHT,

I'm trying to integrate a whitelist for Search Engine Spiders for the NGINX module "Roboo", written in Perl.

From README:
Code:
Roboo_whitelist         -   "UA('Googlebot'),IP(127.0.0.0/8),URI('^/ajax/')"
        - UA('pcre_string') and URI('pcre_string') syntax whitelists a user-agent or URI string using PCRE
        - IP(0.0.0.0/0) syntax whitelists a CIDR network
It works, if I write it as following:
Code:
set $Roboo_whitelist "UA('user-agent-1'),UA('user-agent-2')";
However NGINX gives me a 500 error, if I try to include full user agent strings with brackets and semicolon:
Code:
set $Roboo_whitelist "UA('user-agent-1 (+http://www.google.com/adsbot.html)'),UA('user-agent-2 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)')";
Can anyone help me with this? I'm not really a coder.

__________________
r00t-Services.net | DDoS Protection, Security, Optimization, Troubleshooting.
Got a question? | Contact us: support[at]r00t-services.net
Affordable DDoS Protection up to 20Gbps! (EU/US)

Reply With Quote


Sponsored Links
  #2  
Old 03-09-2012, 12:28 PM
barbus barbus is offline
Aspiring Evangelist
 
Join Date: Aug 2010
Location: Prague, Czech Republic
Posts: 403
What is in error log?

__________________
Supportex.Net server management, full range of services. EU-based outsourced company. Since 1998.
Outstanding quality for high performance projects; clustering and high-availability solutions, DDoS protection.
Cisco/Juniper network management & deployment assistance. Network design and monitoring.

Reply With Quote
  #3  
Old 03-09-2012, 12:32 PM
infinitnet infinitnet is online now
Web Hosting Evangelist
 
Join Date: Dec 2011
Location: /etc/sysconfig
Posts: 453
Got it myself. Some special characters need to be escaped with \, so it should look like:

Code:
set $Roboo_whitelist "UA('user-agent-1 \(\+http\:\/\/www\.google\.com\/adsbot\.html\)'),UA('user-agent-2 \(compatible\; Googlebot\/2\.1\; \+http\:\/\/www\.google\.com\/bot\.html\)')";
Or similar. Will be much fun to write every search engine spider like this.

__________________
r00t-Services.net | DDoS Protection, Security, Optimization, Troubleshooting.
Got a question? | Contact us: support[at]r00t-services.net
Affordable DDoS Protection up to 20Gbps! (EU/US)

Reply With Quote
Sponsored Links
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Magento Nginx vs Litespeed: Nginx 3x faster? vitalis Web Hosting 16 06-19-2011 03:15 PM
Nginx Ready VPS - Preconfigured LNAMP (Linux/Nginx/Apache/MySQL/PHP with ftp support) linux2k VPS Hosting Offers 0 06-03-2011 04:57 AM
Nginx Admin: The Free cPanel Nginx automated installer Plugin linux2k Software & Scripts Offers 13 05-21-2011 11:45 AM
Logwatch report -solving dep for: ['perl(Exporter)', 'perl(strict)', 'perl(vars)', '/ 0218 Hosting Security and Technology 1 11-19-2004 07:20 AM
[perl] Why am I receiving a syntax error? WoodShedd Programming Discussion 3 01-25-2004 07:29 PM

Related posts from TheWhir.com
Title Type Date Posted
nginx Version 1.4.0 Supports SPDY Protocol Web Hosting News 2013-04-29 15:08:14
Open Source Server NGINX Makes LeaseWeb its Preferred Infrastructure Partner Web Hosting News 2012-03-21 18:52:57
nginx Continues Market Share Momentum in Netcraft February Web Server Survey Web Hosting News 2012-02-09 17:29:14
Web Server NGINX Partners With CDN Firm Jet-Stream Web Hosting News 2011-11-21 19:21:42
Open Source Web Server NGINX Receives $3 Million Investment Web Hosting News 2011-10-11 15:24:24


Tags
nginx, perl, roboo, syntax

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?