some months ago I had apache 2.4 and I could create virtualhost, but now I had to change my apache version to 2.2 and my virtualhost is not working, I also have linux mint 17
my virtualhost file is the next: zendvirtual.conf
<VirtualHost *:80>
ServerAdmin roberth#zend
ServerName zend
ServerAlias zend
DocumentRoot /var/www/frameworks/zend/public
<Directory /var/www/frameworks/zend/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Someone knows if I have to add something more, a new line, another configuration?
The syntax:
Require all granted
is not supported under Apache 2.2. The equivalent is:
Allow from all
Related
I have just configured my server with an open-source ALM tool, e.g. ZenTao. Now I need to edit httpd.conf to visit it through my domain with https, but I don't know-how, could someone help with that?
I am using Ubuntu 18.04 LTS (GNU) and I have already applied for a certificate for my domain from Letsencrypt.
If you want to make your https work for your ZenTao domain, you should provision your httpd.conf with port 443 details, which you could refer to the following,
DocumentRoot and Directory should be your /zentao/www root,
And you should configure with your SSL certificates in it as well,
<VirtualHost *:443>
ServerName *.xxx.com
ServerAlias *.xxx.com
DocumentRoot "/zentaoalm/www/"
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/xxx.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/xxx.com.key
SSLCertificateChainFile /etc/apache2/ssl/xxx.com.pem
<Directory "/zentaopms/www">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I have a dedicated server on Apache 2.4 and I made a node application which is running on a Docker container and listenning on the port 5847
So I am trying to configure my apache to make a reverse Proxy to http://my.url.com:5847 on a Debian 8 machine
When I made this, I have the start page of apache "It Works" but not my application. Of course, If I check http://my.url.com:5847 in my navigator, it works fine, but why my reverse Proxy doesn't work?
This is my my.url.com.conf apache config file :
<VirtualHost *:80>
ServerAdmin hello#my-url.com
ServerName my.url.com
ProxyPass "/" "http://my.url.com:5847/"
ProxyPassReverse "/" "http://my.url.com:5847/"
</VirtualHost>
So I'm quite desesperate, I also tried to add
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
I also tried with Required all granted, I tried with the <Location /> directive, with ProxyRequests Off and On too but nothing is working and I don't understand what is going wrong...
Can you help me please? What am I doing wrong?
This wks for me (apache 2.4, node.js runs in 192.168.32.35 on port 3003), on Debian 8
<VirtualHost feed.mydomain.net:3003>
ServerName feed.mydomain.net
ServerAdmin yves#mydomain.com
DocumentRoot /var/www/html
<Location />
ProxyPass http://192.168.32.35:3003/
ProxyPassReverse http://feed.mydomain.net:3003/
Order allow,deny
Allow from all
</Location>
LogLevel trace1 ssl:warn rewrite:trace1
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Okay, so ... I think I found my error, I was writing an conf archive without .conf extension in sites-enabled and that's why apache wasn't taking my configuration... I re-made my configuration file in sties-enabled and then enabled it from apache with a2ensite my.url.com.conf and now it works...
Sorry for the bas question, nothing to do with reverse proxy!
I've created the following virtual host file in /etc/apache2/sites-available/lion.dev:
<VirtualHost *:80>
ServerAdmin webmaster#lion.dev
ServerName lion.dev
DocumentRoot /var/www/lion.dev
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/lion.dev/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
CustomLog /var/log/apache2/lion.dev/access.log combined
ErrorLog /var/log/apache2/lion.dev/error.log
</VirtualHost>
The problem is that it is actually pointing to the /www/html folder when I visit lion.dev in my browser.
What am I missing and why isn't this working?
Did you uncomment load virtual host in httpd.conf file?
That is usally commented and the module wont be loaded, just remove //before virtual host part.
My apologies I saw late that you resolved the issue.
I resolved the issue by uninstalling Ubuntu and re-installing Windows 10
I am trying to setup vHost on my QNAP web server (Running Apache). I seem to be stuck at the point where I can't load the subdomains. I have included a custom conf file in the apache.conf file like so:
include /share/Web/customapache.conf
In the customapache file, I have the following:
NameVirtualHost *:80
ServerName 127.0.0.1
DocumentRoot "/share/Web/site1-home"
<Directory />
Order deny,allow
Deny from all
</Directory>
ServerSignature Off
ServerTokens Prod
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
# ServerAlias www.localhost
DocumentRoot "/share/Web/site1-home"
<Directory "/share/Web/site1-home">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName pods.localhost
# ServerAlias www.pods.localhost
DocumentRoot "/share/Web/site2-pods"
<Directory "/share/Web/site2-pods">
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
It's probably a bit of a mess as I have been trying multiple different examples trying to fix whatever issues I have. I am fairly new to linux, and apache to be honest. I was able to get it all working fine in NGINX, however I ran into some compatability issues with QNAP.
Essentially, the main redirect is working, so that the base directory is now /share/Web/site1-home, but the subdomain is not working (pods.localhost). I am sure its something simple I am missing, or even something I have added that I do not need. But any assistance, or even a point in the right direction would be much appreciated.
Regards
Kirt
I'm trying to run a django app with wsgi on apache on acentos6.5.
Centos6.5 comes with python2.6 while I need python2.7 so I've installed it and want to use my virtualenv.
Since apache was complaining that it does not find django, I decided to set the python home but then it complains that it cannot even the os package.
Here is my httpd.conf:
WSGIPythonHome /root/venv/bin
WSGISocketPrefix /var/run/wsgi
<VirtualHost *:80>
ServerName myproj.com
Serveralias www. myproj.com
ServerAdmin webmaster#localhost
DocumentRoot /var/www/ myproj
ErrorLog /var/log/httpd/ myproj_error.log
CustomLog /var/log/httpd/ myproj_access.log combined
WSGIDaemonProcess myproj python-path=/var/www/ myproj:/root/venv/lib/python2.7/site-packages:/root/venv/lib/python2.7:/root/venv/lib/python2.7/site-packages/
WSGIProcessGroup myproj
WSGIScriptAlias / /var/www/ myproj/ myproj/wsgi.py
<Directory /var/www/ myproj/>
AllowOverride All
Allow from all
</Directory>
<Directory /root/venv/lib/python2.7/site-packages/>
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
here is the path of my virtualenv:
/root/venv/bin/python2.7
Can someone guide me how to make wsgi find and use my python2.7?
Note: I easily made it work on ubuntu so there must be a trick to centos.
Note: I'm sure that it's using python2.6 because I put a log statement in wsgi.py.