Redmine Install, only seeing file and folders. Possible Apache config issue - apache

So I tried to install redmine following the official instructions here:
http://www.redmine.org/projects/redmine/wiki/redmineinstall
And managed to successfully run with webrick (Step 9). After that (the machine is using Debian) I used this guide:
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_210_on_Debian_Squeeze_with_Apache_Passenger
To "serve up" redmine. However after doing all of that I only see a list of files and folders. Here is the 000-default.conf that has the redmine configuration:
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RailsEnv production
RailsBaseURI /redmine
<Directory /redmine>
Options FollowSymLinks
Order deny,allow
PassengerResolveSymlinksInDocumentRoot on
AllowOverride all
Allow from all
RailsBaseURI /redmine
Options -MultiViews
</Directory>
</VirtualHost>
This is just the latest config I tried since I have added every option that I could come up with to try to get it to work. I would appreciate any help on the matter.

Change your directory path:
<Directory "/redmine/public/">
See further information on Redmine at http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine

I had this problem, after much searching this worked - add to your Apache configuration the line:
PassengerAppRoot /opt/redmine
(change the path to where you unziped the redmine files)
See here for explanations:
https://www.phusionpassenger.com/library/config/apache/reference/#passengerapproot

Related

Site Does Not Exist: Flask app on Apache 2.4.29 Ubuntu 18.04

I have looked at all the previous StackOverflow questions regarding this problem but cannot seem to find a solution in any of the answers.
When I run the command:
sudo a2ensite WebApp
I receive:
ERROR: Site WebApp does not exist!
This is my file /etc/apache2/sites-available/WebApp:
<VirtualHost *:80>
ServerName 192.168.1.107
ServerAdmin email#mywebsite.com
WSGIScriptAlias / /var/www/WebApp/WebApp.wsgi
<Directory /var/www/WebApp/WebApp/>
Require all granted
</Directory>
Alias /static /var/www/WebApp/WebApp/website/static
<Directory /var/www/WebApp/WebApp/website/static/>
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I copied that almost verbatim from tech with tim's tutorial.
Except I added the correct file paths and changed
Order allow,deny
Allow from all
to
Require all granted
Does anyone have any suggestions?
You should run
sudo a2ensite CSCI430_CTF1
instead of
sudo a2ensite WebApp

How to install existing prestashop on localhost with APache2? Having pb configuring .conf and virtual hosts

After installing XAMPP, I downloaded the project code and the SQL database:
1) I downloaded the database on phpmyadmin
2)copied the project in var/www/html
Now I am trying to configure Apache2, going through etc/apache2 by adding a file in sites-available containing:
<
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml index.htm
</IfModule>
then disabled the default and enabling mine.
But when I go on localhost:8000, there is no connection and the database seems to be on port 3306.
Could you help me understand better what should I do or what I am doing wrong? Thank you!

Can't get Laravel 4.2 to work / 404

I've tried installing and reinstalling and going through dozens of possible solutions and nothing has worked.
I installed Laravel 4.2 to /var/www/project.
I then created a new virtual host:
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/project/public
<Directory /var/www/project/public>
# Don't show directory index
Options -Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
And enabled it with:
sudo a2ensite project.conf
And restarted apache2. However, when I go to my domain, all I get is a 404:
Not Found
The requested URL / was not found on this server.
What am I doing wrong?
Fixed.
I had to:
sudo a2dissite 000-default.conf
If you are using Linux, add this
ServerName projectname
below <VirtualHost>
Add the line
127.0.0.1 projectname
to the etc/hosts file. So it should work without having to disable other sites.
Restart your apache and test it with http://projectname.

Adding a directory to Apache Server

I have a Windows XP system running XAMPP/Apache. I already have files on an external hard drive that I would like to serve up without moving them to the same drive as the Apache installation.
Here is what I've tried so far:
In the main HTTPD.conf file:
Alias /client_files D:/clients/files
<Directory D:/clients/files>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
But the only result I got was :
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.6
I also tried adding to the HTTPD-VHOSTS.conf file:
ServerName client_files
ServerAlias client_files
DocumentRoot "D:/clients/files"
And also:
<VirtualHost *:80>
ServerAdmin webmaster#dummy-host.example.com
DocumentRoot "D:/clients/files"
ServerName client_files
ServerAlias client_files
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
But neither of these worked either. How in the world can I add another directory to an Apache installation and have it accesible via something like "localhost/client_files"?
Any suggestions?
UPDATE: [SOLVED]
As per #Pedro Nunes's answer below, I now have my httpd.conf file with this section at the end of the file and which includes the line "Require all granted" which Pedro answered with and which now solves the issue:
Alias /client_files D:/clients/files
<Directory D:/clients/files>
Require all granted
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
Have you tried Require all granted inside the directory section?
This will grant access to all requests.
This guide explains exactly how I have it setup on my windows xampp machine. http://www.delanomaloney.com/2013/07/10/how-to-set-up-virtual-hosts-using-xampp/
remember to give an absolute documentroot path as well as adding the 127.0.0.1 servername line to hosts in C:/Windows/System32/drivers/etc/hosts

Multiple versions of a website each with its own root directory using Apache

I have multiple versions of my website. Each resides in its own folder, for example:
site_v1/
index.html
page1.html
site_v2/
index.html
page1.html
How can I configure apache so that each version of the site has its own definition of the root directory?
In other words, I want site_v1/index.html to think the root directory is site_v1, and site_v2/index.html to think the root directory is site_v2
You are looking for the VirtualHost directive.
Apache manual on virtual hosts
As #Pekka wrote, you are indeed looking for the VirtualHost directive, but I though I might add an example configuration for your virtual host configuration. This should be placed in your httpd.conf file, edited to your preference, and remember to fill in the full path:
NameVirtualHost v1.yoursite.com:80
<VirtualHost v1.yoursite.com:80>
ServerName v1.yoursite.com
ServerAlias v1.yoursite.com
DocumentRoot /path/to/site_v1
ErrorLog /path/to/prefered/error.log
CustomLog /path/to/prefered/access.log combined
<Directory /path/to/site_v1>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
NameVirtualHost v2.yoursite.com:80
<VirtualHost v2.yoursite.com:80>
ServerName v2.yoursite.com
ServerAlias v2.yoursite.com
DocumentRoot /path/to/site_v2
ErrorLog /path/to/prefered/error.log
CustomLog /path/to/prefered/access.log combined
<Directory /path/to/site_v2>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
If you want, you may chose to use a different access/error log for each version of your site. Just change the name/path to the log file, and you're done. /path/to are the path to the site folder, and v1.yoursite.com & v2.yoursite.com should be changed to the relative domains you want to use for each version. If you don't want to change the log files, remove the ErrorLog and CustomLog directives and I'll default to the main log files set in httpd.conf