So I have this in my .wixproj
<DefineConstants>ProductVersion=$(ProductVersion);backendDir=backend;frontendDir=frontend;hardwareDir=hardware</DefineConstants>
.....
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<HarvestDirectory Include="frontend">
<DirectoryRefId>frontendDir</DirectoryRefId>
<ComponentGroupName>frontendComp</ComponentGroupName>
<PreprocessorVariable>var.frontendDir</PreprocessorVariable>
</HarvestDirectory>
<HarvestDirectory Include="backend">
<DirectoryRefId>backendDir</DirectoryRefId>
<ComponentGroupName>backendComp</ComponentGroupName>
<PreprocessorVariable>var.backendDir</PreprocessorVariable>
</HarvestDirectory>
<HarvestDirectory Include="hardware">
<DirectoryRefId>hardwareDir</DirectoryRefId>
<ComponentGroupName>hardwareComp</ComponentGroupName>
<PreprocessorVariable>var.hardwareDir</PreprocessorVariable>
</HarvestDirectory>
And then in the Product.wxs I have:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="FlexxEdge">
<Directory Id="frontendDir" Name="frontend"/>
<Directory Id="backendDir" Name="backend"/>
<Directory Id="hardwareDir" Name="hardware"/>
</Directory>
</Directory>
...
<Feature Id="Software"
Title="testInstaller"
Level="1"
ConfigurableDirectory="INSTALLDIR">
<ComponentGroupRef Id="frontendComp" />
<ComponentGroupRef Id="backendComp" />
<ComponentGroupRef Id="hardwareComp" />
</Feature>
So it works and it installs, but for some reason the frontend and hardware folders are nested when they shouldn't be. The backend folder is fine.
File structure - what it should be:
- frontend
- - Files
- backend
- - Files
- hardware
- - Files
What it is after the installer:
- frontend
- - frontend
- - - Files
- backend
- - Files
- hardware
- - hardware
- - - Files
And I checked the actual dirs and they don't have this issue in the project.
So it took a bit of debugging, building and testing, but I finally found the issue.
In Product.wxs I needed to remove the name field on the directories.
...
<Directory Id="INSTALLDIR" Name="FlexxEdge">
<Directory Id="frontendDir"/> <-no name field here!
<Directory Id="backendDir"/>
<Directory Id="hardwareDir"/>
With the name field there is was telling it to put it into a directory called Name and I was already referencing the whole directory so it was nesting it. So for harvesting - just use the directory ref!
I recall in another area of this file the Name function referenced the parent directory - not the one I was working in. So I would recommend being careful with the name field. To be fair, in the documentation on Directory the Name field is "The name of the directory.". So I thought I needed it here. Apparently not.
However it doesn't explain why the backend folder was fine for a while (after several builds it finally had the nested folder issue as well). That was the strangest part of it all, but after seeing that it was a bit easier to track down the issue.
Related
I have a Debian server 9 with Apache 2 and Laravel 5.6
I have the folder: /LcmTI/projects/www to publish my projects, port 81 answers for all projects, eg:
http://localhost: 81/project1 [html project only]
In the folder /LcmTI/projects/laravel, I have two laravel projects 5.6:
extranet at /LcmTI/projects/laravel/extranet
intranet at /LcmTI/projects/laravel/intranet
I have created a link to the two projects in the www folder (which is the folder that is published):
ln -s /LcmTI/projects/laravel/extranet/public /LcmTI/projects/www/extranet
ln -s /LcmTI/projects/laravel/intranet/public /LcmTI/projects/www/intranet
In this way, I expected without any problem to access the two laravel environments without any problem, but it is not working.
When I type:
http://localhost:81/extranet/api/test or http://localhost:81/intranet/api/test
does not work and should return:
/* file routes/api.php in both applications */
`Route::get('test', function () {
return response()-> json(['foo' => 'bar']);
});`
If I enter http://localhost:81/extranet or http://localhost:81/intranet
Enter the homepage of Laravel
My configuration for Apache 2:
<VirtualHost *:81>
DocumentRoot /LcmTI/projects/www
<Directory /LcmTI/projects/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Require all granted
</Directory>
</VirtualHost>
I'm having a hard time setting up larval API applications on a single host.
I am trying to get to work the webplugin example in ete2 package in my own computer (Mac OS X Yosemite) (http://etetoolkit.org/docs/2.3/tutorial/tutorial_webplugin.html#module-ete2.webplugin)
I have reached to the point, where in apache2 error log I get the following errors:
[wsgi:error] [pid 1152] ['name'] The application with bundle ID (null) is running setugid(), which is not allowed.
[wsgi:error] [pid 1154] [client 127.0.0.1:51175] Truncated or oversized response headers received from daemon process 'webplugin_example': /Users/Liis/Sites/webplugin/wsgi/webplugin_example.py, referer: http://webplugin.com/
What I have done is:
1) I did everything said in http://jason.pureconcepts.net/2014/11/configure-apache-virtualhost-mac-os-x/
2) My /Sites folder consists of folder /webplugin
As a result, the webplugin.com shows the main page, but if I click on the 'Draw tree' button, the little box with question mark shows up and the mentioned error messages appear to the log file.
3) My /Hosts/.conf file looks like this:
LoadModule wsgi_module /usr/local/Cellar/mod_wsgi/4.4.11/libexec/mod_wsgi.so
WSGIPythonHome "/Users/Liis/anaconda"
WSGIPythonPath "/Users/Liis/anaconda/lib/python2.7/site-packages"
<VirtualHost *:80>
DocumentRoot "/Users/Liis/Sites"
WSGIDaemonProcess webplugin_example user=_www group=_www processes=1 threads=25 header-buffer-size=32768 python-path="/Users/Liis/anaconda/lib/python2.7/site-packages"
WSGIProcessGroup webplugin_example
WSGIApplicationGroup %{GLOBAL}
ServerName "webplugin.com"
<Directory />
Require all granted
Options +FollowSymLinks
AllowOverride All
</Directory>
<Directory "/Users/Liis/Sites/webplugin/wsgi">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
SetHandler wsgi-script
Order allow,deny
Allow from all
AddHandler wsgi-script .py
</Directory>
</VirtualHost>
Any help would be good:)
I have a feeling that the error could be somehow related to the X server thing, but I have no idea how to fix that in Mac.
All the best,
L.
I'm not only new to Laravel 4, but new to using frameworks. I thought I'd start with Laravel since it's gotten such good reviews.
I've got a good install of Laravel. I go to /l4/public and see the welcome page.
I'm trying to add a route to routes.php so that when I navigate to /l4/public/articles I get a response.
I get "The requested URL /l4/public/articles was not found on this server." Do I need to run an artisan command to compile the routes? It's probably something easy. Why this message?
routes.php
Route::get('/', function()
{
return View::make('hello');
});
Route::get('articles', function ()
{
//return View::make('articles');
return "Articles hello there";
});
Problem is solved by two editing changes in apache's httpd.conf file.
AllowOverride None is default. AllowOverride controls whether .htaccess files are processed.
mod_rewrite is commented out by default.
Changes to make:
Change 1: Activate mod_rewrite by uncommenting it.
Change 2:
Change
AllowOverride None
to
AllowOverride All
Now restart Apache...
The default .htaccess file that Laravel provides in the public folder specified some mod_rewrite rules. These rules were not getting applied because AllowOverride was set to none. Be sure and restart apache after changing these settings.
My configuration: Apache 2.4.6 on Windows XP.
It appears that there may be some security implications to the AllowOverride change. If anyone has additional information on this, I would like to hear it.
That Error basically say that the router cannot found your request. Make sure you already save your changes.
if you using the artisan command to running the page,just re-run again command "artisan Serve".
You need mod_rewrite on. Try: l4/public/index.php/articles
in httpd.conf change
<Directory />
AllowOverride none
Require all granted
</Directory>
to
<Directory />
AllowOverride all
Require all granted
</Directory>
then uncomment
#LoadModule rewrite_module modules/mod_rewrite.so
to
LoadModule rewrite_module modules/mod_rewrite.so
I have a ruby on rails application that is located at /home/user/application. I have a Apache webserver whose DocumentRoot is /var/www. And I have a symlink /var/www/application -> /home/user/application.
My apache configuration section that concerns the ruby on rails is the following:
RailsBaseURI /application
<Directory /home/user/application>
Order Allow,Deny
Allow from all
Options -MultiViews
</Directory>
I modified the Passenger code so in the very beginning of it spawning it would print (to a file) the option app_root. If it matters, I modified the file phusion_passenger/spawn_manager.rb in the method handle_spawn_application.
The value that I get is /home/user and this is wrong, I needed /home/user/application. So my question is, how does Passenger figures out the option['app_root'] (which becomes RAILS_ROOT|Rails.Root)?
Observation: I modified the Passenger code to hardcode app_root to /home/user/application and everything worked fine.
Change the symlink so that /var/www/application points to /home/user/application/public
Then just change RailsBaseURI to RackBaseURI and undo your changes to spawn_manager.rb
Previous discussion assumed single application.
<Directory /var/www/application/public>
Order Allow,Deny
Allow from all
Options -MultiViews
</Directory>
See the Apache Phusion documentation.
You need to add DocumentRoot and append /public to your Directory config and undo your changes to spawn_manager.rb.
As you noticed, the app_root is one directory up from what is specified.. The parent directory of /home/user/application/public is /home/user/application which is the Rails root.
You want RackBaseURI instead of RailsBaseURI for Rails > 3
The reasoning behind this is so that Apache serves the static assets (which are in the public directory) and then if that isn't present Passenger routes the request to the Rails app.
I have Windows XP/Django/apache/mod_python working on localhost. All parts are working with the exception of the admin CSS not rendering. The admin works, but no html formatting. I've made additions in:
settings.py
INSTALLED_APPS
'django.contrib.admin',
urls.py
from django.contrib import admin
admin.autodiscover()
(r'^admin/(.*)', admin.site.root),
conf/http.conf
<Location "/">
SetHandler python-program
PythonPath "['C:/django'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonDebug On
</Location>
<Location "/cpssite/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myapplication.settings
PythonInterpreter /myapplication
PythonDebug On
</Location>
I'm stumped. Is there more code I should have added somewhere?
Does your ADMIN_MEDIA_PREFIX exist? Is it different from MEDIA_URL? Did you include the trailing slash? Is Apache handled to correctly serve up the admin media?
The default Django configuration has the admin media located at {Django install dir}/contrib/admin/media. ADMIN_MEDIA_PREFIX defaults to /media/. So you need to add something like this to your Apache config:
Alias /media/ /path/to/django/contrib/admin/media/
This will tell Apache that requests for mysite.com/media/css/whatever.css mean to serve up /path/to/django/contrib/admin/media/css/whatever.css, which should solve your issue.
I used to have the same problem and the following entry in the http.conf worked fine with me:
<Directory "Path-to-python/Lib/site-packages/django/contrib/admin/media/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
Alias /media/ "Path-to-Python/Lib/site-packages/django/contrib/admin/media/"
<Location "/mysite/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
PythonOption django.root /mysite
PythonInterpreter mysite
PythonDebug On
PythonPath "['C:/Python/Django/apps'] + sys.path"
</Location>
Here is my django-specific apache configuration. Note, django handles every incoming url to the site (location /) except media, where it's disabled, and the data is served from django's media directory.
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE mysite.settings
#PythonOption django.root /
PythonDebug On
PythonPath "['e:/dj'] + sys.path"
</Location>
Alias /media e:/dj/django-trunk/django/contrib/admin/media/
<Location "/media">
SetHandler None
</Location>
If you don't want to have admin media use the /media directory, you can specify ADMIN_MEDIA_PREFIX = 'admin_media', then create a link/alias from your webserver which redirects calls to /admin_media/ to the /usr/share/pyshared/django/contrib/admin/media (depending on your OS) for your production server...
Since the question is from long time back, this may not be a relevant answer but I am putting this information to help anyone who happens to stumble here just like me.
As of version 1.4, ADMIN_MEDIA_PREFIX setting has been deprecated. The ways of serving static and media files with version >= 1.4 are described here
https://docs.djangoproject.com/en/dev/releases/1.4/#django-contrib-admin
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#serving-files
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#serving-the-admin-files
Basically it can be setup in 4 steps -
Set STATIC_ROOT to point to directory which will serve all the static files of your site
Set STATIC_URL for which static content should be served
Run manage.py collectstatic
Configure your webserver to serve requests for STATIC_URL from STATIC_ROOT
Same for media files