Many thanks (again) Ryan. I'll get back in saddle as soon as I regain keyboard 
privileges. 

Cheers

Mike

Connected by Motorola

Ryan Ollos <[email protected]> wrote:

>
>
>
>On Tue, Sep 26, 2017 at 1:54 AM, Mike Dewhirst <[email protected]> wrote:
>
>  <IfModule mod_alias.c>
>    Alias /robots.txt /var/www/trac/projects/ssds/htdocs/site/robots/robots.txt
>    Alias /favicon.ico 
>/var/www/trac/projects/ssds/htdocs/site/assets/img/ssds.ico
>    Alias /chrome/cgi-bin /var/www/trac/projects/ssds/cgi-bin
>    Alias /chrome/common /var/www/trac/projects/ssds/htdocs/common
>    Alias /chrome/site /var/www/trac/projects/ssds/htdocs/site
>  </IfModule>
>
>
>
>You don't need to alias /chrome/cgi-bin, and you can use one Alias for the 
>entire htdocs directory:
>
>
>  <IfModule mod_alias.c>
>
>    Alias /robots.txt /var/www/trac/projects/ssds/htdocs/site/robots/robots.txt
>
>    Alias /favicon.ico 
>/var/www/trac/projects/ssds/htdocs/site/assets/img/ssds.ico
>
>    Alias /chrome /var/www/trac/projects/ssds/htdocs
>
>  </IfModule>
>
>
>The "ssds" directory should have been created with the "trac-admin deploy" 
>command. Is that a Trac environment? It should not be, but a common mistake it 
>to run the deploy command with $env/htdocs as a target. A better layout is 
>something like:
>
>/path/to/env
>
>/path/to/www/htdocs
>
>/path/to/www/cgi-bin
>
>with "www" directory created by the deploy command. The key point is that the 
>"www" directory lives beside the environment, not within it.
>
>
>I typically put robots.txt and favicon.ico in the Trac environment and symlink 
>when running deploy into $www:
>
>
>"$root"/pve/bin/trac-admin "$env" deploy "$www"
>
>ln -s "$env"/favicon.ico "$www"/
>
>ln -s "$env"/robots.txt "$www"/
>
> 
>
>  # lock the public out
>  <Directory /var/www/trac/>
>    Order deny,allow
>    Deny from all
>  </Directory>
>
>
>That might be preventing access to htdocs.
>
>
>You probably want something closer to:
>
>
><Directory /var/www/trac/projects/ssds>
>  Options -Indexes
>  Require all granted
></Directory>
>
>
>Also, it's using Apache < 2.4 syntax. You are almost certainly running Apache 
>2.4.
>
>https://httpd.apache.org/docs/current/upgrading.html#run-time
>
>
>Proper syntax for Apache 2.4 is also covered on the TracModWSGI page:
>
>https://trac.edgewall.org/wiki/TracModWSGI
>
>
>Our documentation for configuring mod_wsgi could be improved. This stuff can 
>be a bit confusing. I plan to rewrite that page eventually.
>
>
>As for standard layout or recommended arrangement, as mentioned I suggest 
>keeping the Trac environment separate from the static assets that are served.
>
>
>Examples:
>
>/var/trac/env1  <= Trac environment for project 1
>
>/var/trac/env2  <= Trac environment for project 2
>
>/var/www/trac/htdocs
>
>/var/www/trac/cgi-bin
>
>
>where "env1" and "env2" are Trac environments and you've run "trac-admin 
>/var/trac/env1 deploy /var/www/trac" to generate the static assets, i.e. the 
>htdocs and cgi-bin directories.
>
>
>Another common configurations is to put everything below /srv:
>
>
>/srv/www.website.com/trac  <= trac environment
>
>/srv/www.website.com/www/htdocs
>
>/srv/www.website.com/www/cgi-bin
>
> 
>
>  # allow public here
>  <Directory /var/www/trac/projects/htmldocs/>
>    Order allow,deny
>    Allow from all
>  </Directory>
>
>  <Location /login>
>    AuthType Basic
>    AuthName "ssds"
>    AuthUserFile /var/svn/user_access/auth-file
>    Require valid-user
>  </Location>
>
>  <IfModule mod_wsgi.c>
>    WSGIScriptAlias / /var/www/trac/projects/ssds/cgi-bin/trac.wsgi
>    <Directory /var/www/trac/projects/ssds/cgi-bin/>
>      WSGIApplicationGroup %(GLOBAL)
>      Order deny,allow
>      Allow from all
>    </Directory>
>  </IfModule>
>
>Here is a view-source excerpt from the top of the ticket query page: (those 
>"alternate" hrefs look a bit dodgy)
>
><link rel="alternate" 
>href="/query?status=!closed&amp;group=status&amp;format=rss&amp;col=id&amp;col=summary&amp;col=owner&amp;col=type&amp;col=priority&amp;col=changetime&amp;col=reporter&amp;order=priority"
> type="application/rss+xml" class="rss" title="RSS Feed" />
>
><link rel="alternate" 
>href="/query?status=!closed&amp;group=status&amp;format=csv&amp;col=id&amp;col=summary&amp;col=owner&amp;col=type&amp;col=priority&amp;col=changetime&amp;col=reporter&amp;order=priority"
> type="text/csv" class="csv" title="Comma-delimited Text" />
>
><link rel="alternate" 
>href="/query?status=!closed&amp;group=status&amp;format=tab&amp;col=id&amp;col=summary&amp;col=owner&amp;col=type&amp;col=priority&amp;col=changetime&amp;col=reporter&amp;order=priority"
> type="text/tab-separated-values" class="tab" title="Tab-delimited Text" />
>
><link rel="next" 
>href="/query?status=!closed&amp;group=status&amp;page=2&amp;col=id&amp;col=summary&amp;col=owner&amp;col=type&amp;col=priority&amp;col=changetime&amp;col=reporter&amp;order=priority"
> title="Next Page" />
>
><link rel="start" href="/wiki" />
>
><link rel="stylesheet" href="/chrome/common/css/trac.css" type="text/css" />
>
><link rel="stylesheet" href="/chrome/common/css/report.css" type="text/css" />
>
><link rel="stylesheet" href="/chrome/common/css/jquery-ui/jquery-ui.css" 
>type="text/css" />
>
><link rel="stylesheet" href="/chrome/common/css/jquery-ui-addons.css" 
>type="text/css" />
>
><link rel="icon" href="/var/www/trac/projects/ssds/htdocs/common/ssds.ico" 
>type="image/x-icon" />
>
><style id="trac-noscript" type="text/css">.trac-noscript { display: none 
>!important }</style>
>
>Thanks for any hints
>
>Mike
>
>
>
>
>On 25/09/2017 7:37 AM, Mike Dewhirst wrote:
>
>Thank you Ryan
>
>I'll get started
>
>M
>
>On 24/09/2017 7:18 PM, RjOllos wrote:
>
>
>
>On Sunday, September 24, 2017 at 1:32:45 AM UTC-7, Mike Dewhirst wrote:
>
>    What is the optimum way to upgrade Trac from a single project
>    installation to two completely separate projects?
>
>
>My opinion is that it's much easier to run everything from a single server: 
>all Trac projects and the SVN projects.
>
>Trac was built to serve multiple projects (environments) from a single server. 
>Rather than configuring TRAC_ENV in your installation you configure 
>TRAC_ENV_PARENT_DIR. If you want different domain names for your projects, I 
>think that can probably be handled in the Apache configuration.
>
>If you want to run the Trac projects in different Python interpreters, that's 
>also possible. It's just a matter of setting up the proper WSGI directives. 
>Take a look at:
>https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html#daemon-mode-single-application
> 
>
>    I'm guessing separate machines but I'd much prefer separate vhosts
>    under
>    the same Apache (mod-wsgi) on the same machine. That would simplify
>    everything for me.
>
>    The svn server is on the original trac server and will also host the
>    separate project source. If we have to go to another machine will
>    that
>    be a problem? I do have a virgin machine upon which to start again.
>
>
>Trac and SVN need to run on the same server. There are ways around that, like 
>setting up a readonly SVN mirror. It will be much easier if you just run all 
>your Trac and SVN instances on the same server.
>
>    A possible complication is I need to drop Python 2.7 and use 3.5
>    exclusively on Ubuntu 16.04 LTS.
>
>
>Trac does not support any version of Python 3.x. You'll have to run Trac with 
>Python 2.7 for now. Support for 3.x is probably more than a year away still.
>
>    I'd be happy to start again provided I can upload a MySQL dump
>    from the
>    original Trac. I would probably switch to Postgres if starting again.
>
>
>The SQLite file is in the project environment so it's simple to move an SQLite 
>project environment to another server.
>https://trac.edgewall.org/wiki/TracBackup
>
>TracMigratePlugin is good for converting a database:
>http://trac-hacks.org/wiki/TracMigratePlugin
>
>The feature has been added to Trac for the forthcoming Trac 1.4 release.
>
>- Ryan
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Trac Users" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to [email protected] 
><mailto:[email protected]>.
>To post to this group, send email to [email protected] 
><mailto:[email protected]>.
>Visit this group at https://groups.google.com/group/trac-users.
>For more options, visit https://groups.google.com/d/optout.
>
>
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Trac Users" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to [email protected].
>To post to this group, send email to [email protected].
>Visit this group at https://groups.google.com/group/trac-users.
>For more options, visit https://groups.google.com/d/optout.
>
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Trac Users" group.
>To unsubscribe from this group and stop receiving emails from it, send an 
>email to [email protected].
>To post to this group, send email to [email protected].
>Visit this group at https://groups.google.com/group/trac-users.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to