hasn't done it yet...
First:
delivery@deli:/var$ sudo chmod 777 /usr/local/venv/trac/bin/trac-admin
delivery@deli:/var$ /usr/local/venv/trac/bin/trac-admin /var/trac initenv
Creating a new Trac environment at /var/trac
...
delivery@deli:/var/trac$ dir
README VERSION conf htdocs log plugins templates
delivery@deli:/var/trac$ sudo /usr/local/venv/trac/bin/trac-admin . deploy
/var/www/trac
Copying resources from:
trac.web.chrome.Chrome
/usr/local/venv/trac/lib/python3.10/site-packages/trac/htdocs
/var/trac/htdocs
Creating scripts.
trac.wsgi:
#!/usr/bin/python3
....
....
# Author: Noah Kantrowitz <[email protected]>
import os
import sys
sys.path.insert(0, '/usr/local/venv/trac')
os.environ['TRAC_ENV'] = '/usr/local/venv/trac'
from trac.web.main import dispatch_request as application
#SetEnv PYTHONHOME /usr/local/venv/trac/bin/python3
#SetEnv PYTHONPATH /var/trac
os.environ['PYTHONHOME'] = '/usr/local/venv/trac/bin/python3'
os.environ['PYTHONPATH'] = '/usr/local/venv/trac'
#import dispatch_request
def application(environ, start_response):
environ['trac.env_path'] = '/var/trac'
return trac.web.main.dispatch_request(environ, start_response)
my trac.conf in /etc/apache2/sites-available:
<VirtualHost *:80>
....
DocumentRoot /var/trac
Alias /chrome/common /var/www/trac/htdocs/common
Alias /chrome/site /var/www/trac/htdocs/site
SetEnv trac.env_path /var/trac
<Directory "/var/www/trac/htdocs">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride None
Require all granted
</Directory>
WSGIDaemonProcess trac python-home=/usr/local/venv/trac
display-name=%{GROUP}
WSGIScriptAlias /trac /var/www/trac/cgi-bin/trac.wsgi
process-group=trac application-group=%{GLOBAL}
<Directory "/var/www/trac/cgi-bin">
AllowOverride None
WSGIApplicationGroup %{GLOBAL}
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
...
</VirtualHost>
apache log error:
[Sat Nov 11 02:22:13.673726 2023] [mpm_event:notice] [pid 10139:tid
140564912088960] AH00492: caught SIGWINCH, shutting down gracefully
[Sat Nov 11 02:22:13.812982 2023] [mpm_event:notice] [pid 10281:tid
140333620463488] AH00489: Apache/2.4.52 (Ubuntu) mod_wsgi/4.9.0 Python/3.10
configured -- resuming normal operations
[Sat Nov 11 02:22:13.813090 2023] [core:notice] [pid 10281:tid
140333620463488] AH00094: Command line: '/usr/sbin/apache2'
apache acess error: [11/Nov/2023:02:22:23 +0000] "GET /trac HTTP/1.1" 404
493 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/117.0.0.0 Safari/537.36"
observation.I reinstalled the entire system ubuntu again...
Em sexta-feira, 10 de novembro de 2023 às 22:51:14 UTC-3, Jun Omae escreveu:
> > 1. Uninstall Trac in $HOME/.local
> >
> > pip uninstall -y Trac Jinja2
> >
> > 2. Create venv and install Trac to the venv
> >
> > sudo python3 -m venv /usr/local/venv/trac
> > sudo /usr/local/venv/trac/bin/pip install Trac
> >
> > 3. Create Trac Environment
> >
> > sudo /usr/local/venv/trac/bin/trac-admin /var/trac
> > sudo chown -R www-data:www-data /var/trac
>
> 4. Set the venv directory to python-home of WSGIDaemonProcess
>
> WSGIDaemonProcess trac python-home=/usr/local/venv/trac
> display-name=%{GROUP}
>
> 5. Set location of the Trac Environment to trac.env_path using SetEnv
> in <VirtualHost *:80>
>
> <VirtualHost *:80>
> ...
> SetEnv trac.env_path /var/trac
> ...
> </VirtualHost>>
>
> 6. Put the following content to /var/www/trac/cgi-bin/trac.wsgi
>
> ====
> #!/usr/bin/python3
> from trac.web.main import dispatch_request as application
> ====
>
>
> --
> Jun Omae <[email protected]> (大前 潤)
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/trac-users/a75e6fff-c178-4e56-80c1-582f6b6591c7n%40googlegroups.com.