wampserver-Apache 2.4.9 configuration for ssl not working - apache

I follow https://madurad.wordpress.com/2014/04/25/redirect-http-to-https-with-wamp-server/ to set up ssl in my wampserver.When I test the configuration,I got a error:
C:\wamp\bin\apache\apache2.4.9\bin>httpd -t
AH00526: Syntax error on line 213 of C:/wamp/bin/apache/apache2.4.9/conf/extra/h
ttpd-ssl.conf:
Invalid command 'Override', perhaps misspelled or defined by a module not includ
ed in the server configuration
There is my configuration in the part of line 213,this is Directory....
/Directory configuration.
<Directory "C:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
Override All
Order allow,deny
allow from all
SSLOptions +StdEnvVars
</Directory>
How can I fix the error?

There is no override parameter!
What I think you mean is AllowOverride so try
<Directory "C:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All <-- fix1
Order allow,deny
allow from all
SSLOptions +StdEnvVars
</Directory>
Additionally Apache 2.4 changed the syntax of the Order... and Allow ... to Require ...
So the syntax should be
<Directory "C:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All <-- fix1
Require all granted <-- fix2
SSLOptions +StdEnvVars
</Directory>

Related

Apache apache2.conf issue

I wantend to access two different version of my site(based on yii2 framework) via slash: http://url.com and http://url.com/something would bring me to another version.
For achieving this i took "something" directory and put it into "url" directory.
It was fine, but not exactly what i wanted, because it seemed like "something" part wasnt loading it's .css and scripts.
I went to apache2.conf file, and modified it -
before:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /home/bahruz/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
after:
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /home/bahruz/www/etap/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
After i did this, https://url.com opens site without css and scripts and reverting apache2.conf doesn't help. I tried to restart the apache server, but it does not help.
Please, tell me why this happens and how can i bring everything back?
Thanks in advance.
I could not solve the issue, but restoring previous backup of the www helped. Maybe something happened with .htaccess, because sometimes it becomes invisible or smth.

Apache: Install Baikal besides Seafile

I need a hint in which direction I should look for an answer on this.
I have set up a Seafile server which is accessible under https://subdomain.no-ip.org, i now want baikal to be accessible under https://subdomain.no-ip.org/baikal
However, I can't get it running because i always get a message from Seafile that this directory does not exist. (I guess seafile thinks it should be a subdirectory)
my recent try to configure apache -
sites-enabled/default-ssl
<VirtualHost *:443>
ServerAdmin webmaster#localhost
Servername gasslnet.no-ip.org
DocumentRoot /var/www
Alias /media /home/andie/seafile-directory/seafile-server-latest/seahub$
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/baikal/html">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
My Seafile-Settings:
ccnet/ccnet.conf
SERVICE_URL = https://subdomain.no-ip.org
seahub_settings.py
FILE_SERVER_ROOT = 'http://subdomain.no-ip.org/seafhttp'
I think the issue is in the seafile configuration, if seafile would be accessible under url/seafile and not only the url the problem should be solved. I tried changing the SERVICE_URL, but no effect.
Do you have any ideas about this?
You have to set
SITE_ROOT = '/seafile'
in the seahub_settings.py to access Seafile under
http://subdomain.no-ip.org/seafile

Change AllowOverride None to AllowOverride All

These two file have the same code inside.
/etc/apache2/sites-enabled/000-default
/etc/apache2/sites-available/default
I would like to change AllowOverride None to AllowOverride All.
Which file should I change?
Is all the AllowOverride None change to AllowOverride All?
<VirtualHost *:80>
DocumentRoot /var/www/drupal
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/drupal>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
/etc/apache2/sites-enabled/000-default
/etc/apache2/sites-available/default
Actually these are not 2 files. One is a symlink of the other. So that is why they are exactly the same.
The sites-available just shows which sites you have on your system. But sites-enabled show which one's are in use.
So just change the original in sites-available because they are the same file. And yes use AllowOverride All to enable .htaccess use under <Directory /var/www/drupal> block.
You can use commands a2ensite and a2dissite to enable and disable sites if you add more later. The link below gives exact instructions if you ever need to do that, which you shouldn't since your site is live.
http://manpages.ubuntu.com/manpages/trusty/man8/a2ensite.8.html

Apache 2.4: How to allow access to a whole directory except a subdirectory in it

I tried this in httpd.conf but it doesn't work, I still gives me access to the subfolder "report".
<Directory "c:/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory "c:/Apache24/htdocs/report">
Require all denied
</Directory>
You need Allow or Deny in the Directory.
<Directory "c:/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory "c:/Apache24/htdocs/report">
Allow from None
Order allow,deny
</Directory>
More details in the Apache docs: http://httpd.apache.org/docs/current/mod/mod_access_compat.html#allow

Apache forbidden access

Here is a part of my httpd.conf file:
<Directory C:\wamp\www>
Options Indexes FollowSymLinks +ExecCGI
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
And the error log says:
client denied by server configuration: C:/wamp/www/Bugzilla
I try to access:
localhost/bugzilla
Try putting the following:
<Directory "C:\wamp\www">
Options Indexes FollowSymLinks +ExecCGI
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
Add this to its config:
Require all granted