<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Techy Things &#187; automation</title>
	<atom:link href="https://tech.yipp.ca/category/automation/feed/" rel="self" type="application/rss+xml" />
	<link>https://tech.yipp.ca</link>
	<description>Just another Yipp.ca Blogs site</description>
	<lastBuildDate>Thu, 01 May 2025 18:06:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Mousewheel prevent body scroll on modal</title>
		<link>https://tech.yipp.ca/automation/backbone-prevent-body-scroll-modal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=backbone-prevent-body-scroll-modal</link>
		<comments>https://tech.yipp.ca/automation/backbone-prevent-body-scroll-modal/#comments</comments>
		<pubDate>Tue, 09 May 2017 13:59:19 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=2802</guid>
		<description><![CDATA[<p>Solution #1   // prevent background of modal from scrolling   // DOMMouseScroll for Firefox equivalent   $(document).on("mousewheel DOMMouseScroll", ".modal-backdrop, .modal-body", function(event) {     event.stopPropagation();     event.preventDefault();   });   // prevent background of&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/backbone-prevent-body-scroll-modal/">Mousewheel prevent body scroll on modal</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Solution #1</p>
<pre>  // prevent background of modal from scrolling
  // DOMMouseScroll for Firefox equivalent
  $(document).on("mousewheel DOMMouseScroll", ".modal-backdrop, .modal-body", function(event) {
    event.stopPropagation();
    event.preventDefault();
  });

  // prevent background of modal from scrolling
  var keysThatScroll = new Array(33,34,35,36,37,38,39,40);
  var DEBUG_KEY_SCROLL_PREVENTION = false;
  $(document).on("keydown", function(event) {
    var key = event.which;
    if ($.inArray(key,keysThatScroll) === -1) {
      if (DEBUG_KEY_SCROLL_PREVENTION) console.log("no worries for this key", key);
      return true; // no worries for this key
    }

    if ($(".modal-backdrop").length === 0) {
      if (DEBUG_KEY_SCROLL_PREVENTION) console.log("no modification when modal is off");
      return true; // no worries for these keys
    }

    if (event.target == null || event.target.tagName == null) { // should not happen
      if (DEBUG_KEY_SCROLL_PREVENTION) console.log("event.target or event.target.tagName is null or undefined");
      return true;
    }

    if (event.target.tagName.toLowerCase() === "body") {
      if (DEBUG_KEY_SCROLL_PREVENTION) console.log("keydown, on body, stopping");
      event.preventDefault();
      return false;
    }

    if (event.target.type == null) {
      if (DEBUG_KEY_SCROLL_PREVENTION) console.log("keydown, no type and not body, letting go");
      return true; // ok keep going
    }

    var type = event.target.type.toLowerCase();
    if (DEBUG_KEY_SCROLL_PREVENTION) console.log("keydown, type", type);
    if (type == 'input' || type == 'text' || type == 'textarea' ||type == 'select') {
      // normal keyup and keydown allowed in modals
      return true; // ok keep going
    }
    
    // stop scrolling keys in modal of further effects, for example if focus is on a button and keydown
    event.preventDefault();
    event.stopPropagation();
    return false; // in jQuery returning false does the same as preventDefault and stopPropagation
  });</pre>
<pre>Solution #2

   // extend Bootstrap modal to remove scrollbar during modal show
   var _show = $.fn.modal.Constructor.prototype.show;
   $.fn.modal.Constructor.prototype.show = function() {
      _show.apply(this, arguments);
      $("body").addClass("modal-on");
   };
   var _hide = $.fn.modal.Constructor.prototype.hide;
   $.fn.modal.Constructor.prototype.hide = function() {
      _hide.apply(this, arguments);
      $("body").removeClass("modal-on");
   };

along with CSS

html,
body {
   width: 100%;
   height: 100%;
   padding: 0;
   margin: 0;
}
body {
   overflow-y: scroll;
}

body.modal-on {
   overflow:hidden;
}


</pre>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/backbone-prevent-body-scroll-modal/">Mousewheel prevent body scroll on modal</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/automation/backbone-prevent-body-scroll-modal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selenium with Python</title>
		<link>https://tech.yipp.ca/automation/selenium-python/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=selenium-python</link>
		<comments>https://tech.yipp.ca/automation/selenium-python/#comments</comments>
		<pubDate>Thu, 27 Oct 2016 16:59:08 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[automation]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=2640</guid>
		<description><![CDATA[<p>Debugging Use something like http://www.pyzo.org/pyzo_intro.html Documentation http://selenium-python.readthedocs.io/api.html?highlight=phantom#module-selenium.webdriver.remote.webdriver Find Selenium Version $&#62; python &#62;&#62;&#62; import selenium &#62;&#62;&#62; help (selenium) (...) DATA __version__ = '3.8.0' VERSION 3.8.0 Also you can check a pip package version with: $&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/selenium-python/">Selenium with Python</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2>Debugging</h2>
<p>Use something like http://www.pyzo.org/pyzo_intro.html</p>
<h2>Documentation</h2>
<p>http://selenium-python.readthedocs.io/api.html?highlight=phantom#module-selenium.webdriver.remote.webdriver</p>
<h2>Find Selenium Version</h2>
<pre>$&gt; python</pre>
<p><code>&gt;&gt;&gt; import selenium &gt;&gt;&gt; help (selenium) (...) DATA __version__ = '3.8.0' VERSION 3.8.0<br />
</code></p>
<p>Also you can check a pip package version with:</p>
<pre>$ pip show selenium</pre>
<h2>Installation</h2>
<ol>
<li>Note down your <span style="color: #ff6600;">Firefox</span> version (in my case 52.5.1 ESR)<br />
Maybe install an Extended Support Release (ESR) type and disable updates to make sure you get a  <strong>constant development environment</strong>. Note that you will be more exposed to security flaws by not updating.</li>
<li>Get Python. In my case I used <span style="color: #ff6600;"><span style="color: #ff6600;"><span style="color: #ff6600;">Python 2.7.8<span style="color: #000000;">.<br />
Install it with python version manager:<br />
<a href="https://github.com/pyenv/pyenv" target="_blank">https://github.com/pyenv/pyenv</a><br />
Follow instructions from the link above, namely :</span></span></span></span></p>
<pre>$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' &gt;&gt; ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' &gt;&gt; ~/.bash_profile
$ echo -e 'if command -v pyenv 1&gt;/dev/null 2&gt;&amp;1; then\n  eval "$(pyenv init -)"\nfi' &gt;&gt; ~/.bash_profile
$ reboot

# after reboot

$ pyenv install 2.7.8</pre>
</li>
<li>Get Selenium for Python. In my case I used Selenium 3.8.0
<pre>pip install selenium==3.8.0</pre>
</li>
<li>Get <span style="color: #ff6600;">PhantomJS</span> binary and put it on path<br />
<a href="https://bitbucket.org/ariya/phantomjs/downloads/" target="_blank">https://bitbucket.org/ariya/phantomjs/downloads/</p>
<p></a></li>
<li>Get Firefox <span style="color: #ff6600;">geckowebdriver</span> and put it on path.<br />
https://github.com/mozilla/geckodriver/releases</li>
</ol>
<p>Make sure you use a <strong>web driver</strong> version compatible with your <strong>selenium</strong> version.</p>
<p>To find selenium version see previous section.</p>
<h2>Troubleshooting</h2>
<p><strong>Problem: WebDriverException: Message: 'geckodriver' executable needs to be in PATH.</strong><br />
or<br />
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.</p>
<p><strong>Solution</strong></p>
<p>https://github.com/mozilla/geckodriver/releases<br />
Put <strong><span style="color: #ff6600;">geckodriver.exe</span> </strong>in your PATH or in the current directory.</p>
<p>&nbsp;</p>
<p><strong>Problem : Firefox displays : Your connection is not secure</strong></p>
<p>Solution : Help needed! I still don't know how to resolve. Even with a loaded profile. This happens on Windows, but not on Linux.</p>
<p>&nbsp;</p>
<p><strong>Problem: selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH.</strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/selenium-python/">Selenium with Python</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/automation/selenium-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ghost process after running PhantomJS</title>
		<link>https://tech.yipp.ca/automation/ghost-process-running-phantomjs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ghost-process-running-phantomjs</link>
		<comments>https://tech.yipp.ca/automation/ghost-process-running-phantomjs/#comments</comments>
		<pubDate>Wed, 02 Mar 2016 20:00:06 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[phantomjs]]></category>
		<category><![CDATA[selenium]]></category>
		<category><![CDATA[webdriver]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=2253</guid>
		<description><![CDATA[<p>Spooky ! &#160; Short term solution $&#62; ps -ef &#124; grep phantom &#124; grep -v grep &#124; awk '{print $2}' &#124; xargs kill -9 &#160; Better long-term solution Using driver.quit() : driver = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true', '--ssl-protocol=any']) driver.get('https://'&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/ghost-process-running-phantomjs/">Ghost process after running PhantomJS</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2>Spooky !</h2>
<p><a href="http://tech.yipp.ca/files/2016/03/phantomjs-ghost-processes.png"><img class="alignnone wp-image-2256 size-full" src="http://tech.yipp.ca/files/2016/03/phantomjs-ghost-processes.png" alt="list of dangling phantomjs processes" width="837" height="369" /></a></p>
<p>&nbsp;</p>
<h2>Short term solution</h2>
<pre>$&gt; ps -ef | grep <em>phantom</em> | grep -v grep | awk '{print $2}' | xargs kill -9</pre>
<p>&nbsp;</p>
<h2>Better long-term solution</h2>
<p>Using driver.<strong>quit() :</strong></p>
<pre>driver = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true', '--ssl-protocol=any'])
driver.get('https://' + str(host) + '/')
...
<strong><span style="color: #ff6600;">driver.quit()</span></strong></pre>
<p>&nbsp;</p>
<h2>What if you use .quit() but still see them hanging around?</h2>
<p>There is a <strong>bug</strong> affecting versions around <strong>1.9.8</strong> where there is no cleanup going on. The solution is to upgrade to <em><span style="color: #ff6600;">PhantomJS 2.0.0</span></em> or more recent. See this <a href="https://github.com/detro/ghostdriver/issues/162" target="_blank">github issue</a>.</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/ghost-process-running-phantomjs/">Ghost process after running PhantomJS</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/automation/ghost-process-running-phantomjs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install and use a BrowserShots server !</title>
		<link>https://tech.yipp.ca/automation/install-use-browsershots-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-use-browsershots-server</link>
		<comments>https://tech.yipp.ca/automation/install-use-browsershots-server/#comments</comments>
		<pubDate>Sat, 06 Sep 2014 04:05:21 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[automation]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=960</guid>
		<description><![CDATA[<p>What will this page do for you Install browsershots locally (called shotserver) Install a screen shot factory (called shotfactory) Instructions instructions were tested in linux debian with these versions : Python 2.7.3 Django 1.6.7&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/install-use-browsershots-server/">How to install and use a BrowserShots server !</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2>What will this page do for you</h2>
<ul>
<li><b>Install browsershots locally (called shotserver)</b></li>
<li>Install a screen shot factory (called shotfactory)</li>
<li>Instructions instructions were tested in linux debian with these versions :
<ul>
<li><strong>Python 2.7.3</strong></li>
<li><strong>Django 1.6.7 (link provided below)</strong></li>
<li><strong>Browsershots latest version (2008) with my patches (link provided below)</strong></li>
</ul>
</li>
</ul>
<p>You will create and store custom password for these instances :</p>
<ul>
<li>linux machine user.</li>
<p></p>
<li>postgresql super user.</li>
<li>django super admin.</li>
</ul>
<h2>= Installation / Setup =</h2>
<h4>1. Install django</h4>
<p>UPDATE: Now use github to checkout django :</p>
<pre>git clone -b 1.6.7 https://github.com/foligny/django django-1.6.7
cd django-1.6.7
sudo python setup.py install</pre>
<h4>2. Download browsershots server (shotserver)</h4>
<pre>cd ..
git clone https://github.com/foligny/browsershots-psycopg2
cd browsershots-psycopg2/shotserver
sudo python setup.py install</pre>
<h4>3. Get PostgreSQL and psycopg2 prerequisites</h4>
<pre>sudo apt-get install postgresql</pre>
<pre>sudo apt-get install python-psycopg2</pre>
<p>The following post-install documentation is from the Postgre Official Documentation :</p>
<p>&lt;&lt; PostgreSQL is an object-relational database system that has the features of traditional commercial database systems with enhancements to be found in next-generation DBMS systems.</p>
<p>Once the installation is complete, you should configure the PostgreSQL server based on your needs, although the default configuration is viable.</p>
<p>Configuration</p>
<p>By default, connection via TCP/IP is disabled. PostgreSQL supports multiple client authentication methods. By default, IDENT authentication method is used for postgres and local users. Please refer the PostgreSQL Administrator's Guide.</p>
<p>The following discussion assumes that you wish to enable TCP/IP connections and use the MD5 method for client authentication. PostgreSQL configuration files are stored in the /etc/postgresql/{version}/main directory. For example, if you install PostgreSQL 8.3, the configuration files are stored in the /etc/postgresql/8.3/main directory.</p>
<p>[Tip]</p>
<p>To configure ident authentication, add entries to the /etc/postgresql/8.3/main/pg_ident.conf file.</p>
<p>To enable TCP/IP connections, edit the file /etc/postgresql/8.3/main/postgresql.conf</p>
<p>Locate the line #listen_addresses = 'localhost' and change it to:</p>
<p>listen_addresses = 'localhost'</p>
<p>[Note]</p>
<p>To allow other computers to connect to your PostgreSQL server replace 'localhost' with the IP Address of your server.</p>
<p>You may also edit all other parameters, if you know what you are doing! For details, refer to the configuration file or to the PostgreSQL documentation.</p>
<p>Now that we can connect to our PostgreSQL server, the next step is to set a password for the postgres user. Run the following command at a terminal prompt to connect to the default PostgreSQL template database:</p>
<pre>sudo -u postgres psql template1</pre>
<p>The above command connects to PostgreSQL database template1 as user postgres. Once you connect to the PostgreSQL server, you will be at a SQL prompt. You can run the following SQL command at the psql prompt to configure the password for the user postgres.</p>
<pre>ALTER USER postgres with encrypted password 'your_password';
\q</pre>
<p>After configuring the password, edit the file /etc/postgresql/8.3/main/pg_hba.conf to use MD5 authentication with the postgres user:</p>
<p>Change this line (this is *not* the first line but the second line of data)</p>
<pre>local   all             all                                     peer</pre>
<p>To this :</p>
<p><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">local  all              all                                     md5</span></p>
<p>Finally, you should restart the PostgreSQL service to initialize the new configuration. From a terminal prompt enter the following to restart PostgreSQL:</p>
<pre>sudo /etc/init.d/postgresql restart</pre>
<p>[Warning]</p>
<p>The above configuration is not complete by any means. Please refer the PostgreSQL Administrator's Guide to configure more parameters.<br />
Resources</p>
<p>As mentioned above the Administrator's Guide is an excellent resource. The guide is also available in the postgresql-doc-8.3 package. Execute the following in a terminal to install the package:</p>
<p>sudo apt-get install postgresql-doc-8.3</p>
<p>To view the guide enter file:///usr/share/doc/postgresql-doc-8.3/html/index.html into the address bar of your browser.</p>
<p>Create a new user for browershot : <em>bshotuser</em> (note in original documentation the user is called www-data)</p>
<p><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">sudo -u postgres createuser bshotuser<br />
</span><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">Shall the new role be a superuser? (y/n) n<br />
</span><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">Shall the new role be allowed to create databases? (y/n) y<br />
</span><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">Shall the new role be allowed to create more new roles? (y/n) n</span></p>
<pre>ALTER USER postgres with encrypted password 'your_password';
\q</pre>
<p><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">Or on windows or command-line :</span></p>
<pre>psql -U postgres -c "CREATE ROLE \"bshotuser\" LOGIN NOSUPERUSER INHERIT CREATEDB NOCREATEROLE;" shotserver04</pre>
<p><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">psql -U postgres -c "ALTER USER \"bshotuser\" with encrypted password \"your_password\";" shotserver04</span></p>
<p>&nbsp;</p>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;">Create a new database :</span></pre>
<pre>sudo -u postgres createdb shotserver04
 NOTE: You might get warning about "could not change directory to xyz" or "sudo: unable to resolve host xyz". The create operation will succeed anyway.</pre>
<h4>4. Complete the browsershot specific steps</h4>
<pre>Edit shotserver04/settings.py to put your database credentials</pre>
<p>Let Django create the database tables for you:</p>
<pre><span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">cd shotserver/shotserver04
</span>./manage.py syncdb</pre>
<p>When it asks if you would like to create an admin account, say yes.</p>
<p><em>Create content folders</em></p>
<p>If you haven't changed the directories in <em>settings.py</em>, you need the following folders:</p>
<p>&nbsp;</p>
<pre>sudo mkdir -p /var/www/v04.browsershots.org/png</pre>
<p>&nbsp;</p>
<p>The png folder must be writable by the user running the server.</p>
<p>&nbsp;</p>
<pre>sudo chown www-data:www-data /var/www/v04.browsershots.org/png</pre>
<p>== Now you have a running server ==<br />
http://localhost:8000/</p>
<p>== Create a superuser ==<br />
cd shotserver/shotserver04<br />
./manage.py createsuperuser</p>
<p>*Note: You must restart the server after you createsuperuser*</p>
<p>{{{<br />
sudo mkdir -p /var/www/v04.browsershots.org/png<br />
}}}<br />
The png folder must be writable by the user running the shotserver.<br />
{{{<br />
sudo chown admin:admin /var/www/v04.browsershots.org/png<br />
}}}</p>
<p>For a production system, you don't want to use the development server that comes with Django. Here's how you set up Apache for Browsershots.</p>
<p>sudo apt-get install apache2 libapache2-mod-python</p>
<p>Create directory for log files:</p>
<p>sudo mkdir -p /var/log/apache2/v04.browsershots.org/</p>
<p>Enable mod_rewrite:</p>
<p>sudo a2enmod rewrite</p>
<p>Then put the following in /etc/apache2/sites-available/v04.browsershots.org:</p>
<p>ExtendedStatus On<br />
NameVirtualHost *:80<br />
<VirtualHost *:80><br />
    ServerName browsershots.example.com # FQDN<br />
    ServerAlias browsershots # Local alias<br />
    ServerAdmin webmaster@example.com<br />
    ServerSignature On</p>
<p>    LogLevel warn<br />
    ErrorLog /var/log/apache2/v04.browsershots.org/error.log<br />
    CustomLog /var/log/apache2/v04.browsershots.org/access.log combined</p>
<p>    DocumentRoot /var/www/v04.browsershots.org<br />
    <Directory /var/www/v04.browsershots.org><br />
        Options -Indexes</p>
<p>        RewriteEngine On<br />
        RewriteBase /</p>
<p>        # Force canonical hostname.<br />
        RewriteCond %{HTTP_HOST} !^browsershots.example.com(|:80)$<br />
        RewriteRule ^(.*)$ http://browsershots.example.com/$1 [R,L]</p>
<p>        # Static files at server root<br />
        RewriteRule ^(favicon.ico|robots.txt)$ static/$1 [L]</p>
<p>        # Force HTTPS for secure pages (uncomment next line to enable)<br />
        # RewriteRule ^(admin|accounts)(/.*)$ https://browsershots.example.com/$1$2 [R,L]<br />
    </Directory></p>
<p>    <Location /><br />
        SetHandler python-program<br />
        PythonHandler django.core.handlers.modpython<br />
        SetEnv DJANGO_SETTINGS_MODULE shotserver04.settings<br />
        PythonDebug Off<br />
        PythonAutoReload Off<br />
    </Location></p>
<p>    <Location /png><br />
        SetHandler None<br />
    </Location></p>
<p>    <Location /static><br />
        SetHandler None<br />
    </Location></p>
<p>    <Location /media><br />
        SetHandler None<br />
    </Location></p>
<p>    <Location /server-status><br />
        SetHandler server-status<br />
        Allow from all<br />
    </Location><br />
</VirtualHost></p>
<p># Local variables:<br />
# mode: apache<br />
# end:</p>
<p>Make sure that file is the first symlink in /etc/apache/sites-enabled and then restart Apache:</p>
<p>sudo a2dissite default<br />
sudo a2ensite v04.browsershots.org<br />
sudo apache2ctl restart</p>
<p>Create some symlinks for static content:</p>
<p>cd /var/www/v04.browsershots.org/<br />
sudo ln -s /usr/lib/python2.5/site-packages/shotserver04/static<br />
sudo ln -s /usr/lib/python2.5/site-packages/django/contrib/admin/media</p>
<p>The post <a rel="nofollow" href="https://tech.yipp.ca/automation/install-use-browsershots-server/">How to install and use a BrowserShots server !</a> appeared first on <a rel="nofollow" href="https://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://tech.yipp.ca/automation/install-use-browsershots-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
