Basic questions: Apache Alias configuration in WAMP for a single application

Keywords: LAMP/MAMP/WAMP - Installers - How to - Application configuration

Description:
I’m trying to create a web path to a fileshare using Apache Alias directive on WAMP 8.0.8. I have deployed my application called “winforms”, and I’m trying to use [ Alias /winforms/docs/ "//company.com/path/folder/" ] with UNC path. I also tried to use [Alias /winforms/docs/ "C:\temp\" ]. In all case, I get “not found” error. Also tried Alias on the main htdocs/docs folder, same results.

The file share only needed to be available for this “winforms” application, but giving access to all deployed apps would be acceptable.

I tried to modify these config files, and restarted the Apache server after every change:

c:\appl\WAMPstack\wampstack808\apps\winforms\conf\httpd-prefix.conf
c:\appl\WAMPstack\wampstack808\apps\winforms\conf\\httpd-vhosts.conf
C:\appl\WAMPstack\wampstack808\apache2\conf\httpd.conf 
C:\appl\WAMPstack\wampstack808\apache2\conf\bitnami\bitnami.conf

The mod_alias module is enabled in \apache2\conf\httpd.conf by default, and I have added LoadModule vhost_alias_module modules/mod_vhost_alias.so .
Also tried to use Alias with & without creating /winforms/docs/ .

I am new to php/Apache, and I have run out of ideas how to do it. Please, help. How to do it right?

Hi @doom3do

Thanks for using Bitnami LAMP!

I think you may have not followed our guide when creating your custom PHP application “winforms”. This guide makes sure that the specific configuration of your app is being included and interpreted by Apache (e.g. the Alias directive), and maybe is the root of your problem.

https://docs.bitnami.com/installer/infrastructure/lamp/administration/create-custom-application-php/

Could you please take a look at it and verify everything was set up accordingly?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

  1. After adding acces rights to c:\tempdir using <Directory …> … Require all granted , the Alias worked for local files, but didn’t work for file shares.
  2. When I have stopped the Apache service and restarted Apache under my user, access to file shares worked. It turned out, that the Apache service runs with a LocalSystem account, wich doesn’t have access rights on file shares. So I will need a technical user with network access to start the service, or I will have to start Apache without using a service.

It is strange, that the Apache server restart failed without any error in the error log, when it didn’t have access right on the aliased folder.
Anyway, I have already spent 24 hours on learning Apache / PHP, and things are starting to get clear.

Glad to see you were able to solve your issue! We are marking the previous answer as “Solution” and this topic as “Closed”.

If you have any other questions, please do not hesitate to let us know. Feel free to create a new topic referencing this one if necessary.

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart: