Hello I'd like to deploy my website using Apache2, my domainname is www.hew-automation.be. I've already made a link from this domainname to my server's IP Address (http://91.183.84.209:8080/). I want to get rid of the port 8080 and also stop displaying the IP address in the browser.
I installed apache2, added following to /etc/apache2/sites-available/odoo.conf:
<VirtualHost *:80>
ServerName hew-automation.be
ServerAlias *.hew-automation.be // Use this if you want dbfillter on subdomain
ErrorLog /var/log/odoo/odoo-error.log
CustomLog /var/log/odoo/odoo-access.log combined
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyVia On
LogLevel warn
</VirtualHost>
Then enabled this with a2ensite, this without any errors.
This is my /etc/odoo-server.conf file:
[options]
admin_passwd = XXXX
db_host = False
db_port = False
db_user = XXXX
db_password = XXXX
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo-server.log
xmlrpc_port = 8068
Now whenever I surf to my IP-address http://91.183.84.209/, it always shows the default page of Apache2, what am I doing wrong here?
Thanks.
Related
I need to run grafana and kibana on a same server while running behind Apache2 reverse proxy
I manage to succeed with kibana, but grafana cause me some problems; in fact I don't how how to run the sub path.
I want these two services to run like this : X.X.X.X/kibana and X.X.X.X/grafana.
Here is my apache2 config and my grafana settings:
<VirtualHost *:80>
ServerName http://myipadress/kibana
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://myipadress:5601/
ProxyPassReverse / http://myipadress:5601/
</VirtualHost>
#--------------GRAFANA----------------------------
<VirtualHost *:80>
ServerName http://myipadress/grafana
ProxyRequests On
ProxyPreserveHost On
ProxyPass / http://myipadress:3000/
ProxyPassReverse / http://myipadress:3000/
</VirtualHost>
For grafana :
protocol = http
http_port = 3000
domain = myipadress
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
serve_from_sub_path = true
Does anyone know what I did wrong
Cheers
Hello after loosing too much time on it, I decided to change my reverse proxy and use NGINX.
I fact, there is a example of configuration in grafana's documentation, and I just added these lines
location /kibana {
proxy_pass http://localhost:5601/kibana;
}
And it just work for me
I have a subdomain test.example.com.
I have a java web application running in tomcat 8.5 on port 8086.
In /opt/tomcat/conf/server.xml I have a virtual host defined like below.
<Host name="canicarry.thehatapps.com" appBase="webapps/SecondAmendmentSupporters-0.2" unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="canicarry_access_log" suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
I have an apache2 conf defines like below.
/etc/apache2/sites-available/test.example.com.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster#localhost
ServerName test.example.com
ServerAlias www.test.example.com.com
DocumentRoot /var/www/test.example.com/public_html
<Directory /var/www/test.example.com/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
In public_html I have .htaccess defined like below.
RedirectPermanent / http://test.example.com:8086
My goal is to be able to hit the myapp-02 tomcat web app on port 8086 like so http://canicarry.thehatapps.com:8086
I'm not sure what's wrong but I get 404. I can't seem to resolve http://canicarry.thehatapps.com:8086 to my web app running in tomcat.
Any help would be appreciated.
EDITED-----------
Using this in my apache conf file helped but still running into issues.
<VirtualHost canicarry.thehatapps.com/*:80>
ServerName canicarry.thehatapps.com
ProxyRequests Off
ProxyPass / ajp://localhost:8086/SecondAmendmentSupporters-0.2
ProxyPassReverse / ajp://localhost:8086/SecondAmendmentSupporters-0.2
</VirtualHost>
When I type http://canicarry.thehatapps.com:8086, I'm taken to
http://104.238.96.249:8086/SecondAmendmentSupporters-0.2/
Which is the full url to my tomcat application. However, when I append an endpoint, it doesn't resolve. In addition, the url should still be http://canicarry.thehatapps.com:8086. It shouldn't show the full url to the tomcat application instance.
For example, http://canicarry.thehatapps.com:8086/places should return a list of places from the service but it doesn't resolve the url.
Your <VirtualHost *:80> is telling apache to listen on port 80.
If you want the application to be exposed over port 8086 then you need to proxy the port 8086 to your tomcat server. You can do this using the ajp_proxy module of apache.
<VirtualHost test.example.com:8086>
ServerName test.example.com
ProxyRequests Off
ProxyPass /examples ajp://127.0.0.1:8086/examples
ProxyPassReverse /examples ajp://localhost:8086/examples
</VirtualHost>
See below article for details
https://linuxconfig.org/how-to-set-up-apache-webserver-proxy-in-front-of-apache-tomcat-on-red-hat-linux
I've been trying to create subdomains in my Google Cloud Console and then direct them to a folder in my /var/www directory.
I created a subdomain:
DNS Name: subdomain.example.com
Type: CNAME
TTL: 300
Data: example.com
I created a folder
/var/www/subdomain
I created a file with message "Subdomain!"
/var/www/subdomain/index.html
After, I duplicated my 000-default.conf
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/subdomain.conf
I edited the new file code to:
<VirtualHost *:80>
ServerAdmin webmaster#subdomain.example.com
DocumentRoot /var/www/subdomain
ServerName subdomain.example.com
ServerAlias www.subdomain.example.com
Redirect permanent / https://subdomain.example.com/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I then did
sudo a2ensite subdomain.conf
sudo service apache2 restart
Yet my subdomain is still directed at the document root /var/www/html
I noticed that when I do systemctl reload apache2 I get error Failed to connect to bus: No such file or directory
Did I miss a step or do I need to add something else?
The problem is that http is configured but not https.
Must add to default-ssl.conf
<VirtualHost *:443>
ServerName www.yoursite.com
DocumentRoot /var/www/site
SSLEngine on
SSLCertificateFile /path/to/www_yoursite_com.crt
SSLCertificateKeyFile /path/to/www_yoursite_com.key
SSLCertificateChainFile /path/to/DigiCertCA.crt
</VirtualHost>
please how to set Github 6.0 with Apache2?
Gitlab is installed according to the original instructions
Adjustment in Unicorn.rb
...
#listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64
#listen "127.0.0.1:8080", :tcp_nopush => true
listen "127.0.0.1:8080"
...
My Apache2 conf is :
<VirtualHost *:80>
ServerName git.domain.com
ErrorLog /var/log/apache2/gitlab_error.log
CustomLog /var/log/apache2/gitlab_access.log combined
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
<Location />
ProxyPassReverse /
Order deny,allow
Allow from all
</Location>
</VirtualHost>
Bud i get :
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /users/sign_in.
Reason: Error reading from remote server
Thank you
In case this helps anyone else;
I had this same problem, but it was a lack of disk space in my case. I deleted some large backups and restarted apache with service httpd restart and my gitlab came back.
I have a static public IP and I am hosting my websites on it (Ubuntu Server 12.04). I need to set up a subdomain but It's not working, even www. is not working. I bought the domain from GoDaddy and I set up the correct NS
I saved the configuration file in /etc/apache2/sites-available under domain.me and then I did a2ensite domain.me and reloaded and restarted apache2, but still no luck.
This is my configuration file
<VirtualHost *:80>
ServerAdmin webmaster#domain.me
ServerName domain.me
ServerAlias www.domain.me
DocumentRoot /var/www
LogLevel warn
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster#domain.me
ServerName me.subdomain.me
ServerAlias www.me.subdomain.me
DocumentRoot /var/www/subdomain
</VirtualHost>
curl http://domain.me outputs the index file, curl http://www.domain.me outputs curl: (6) Couldn't resolve host 'www.domain.me' and same for the subdomain
I managed to fix it, and for those of you who is having the same problem, make sure you set up the A records