httpd fails to start after ssl.conf was updated with virutal host - apache

I'm able to get the website with ssl enabled for a single site.
If I add virtual hosts under ssl.conf, the httpd refuses to start and I did setenforce 0, still no luck.
More details:
I created different certificate for the new virtual host. But seems like issue persists.

Related

Remote access of network computer

I am not sure how or if this can be done. I have a home network and would like to see a computer,not the server, via a remote location. I have Apache on my server. Example: the network computers I would like to see ip 152.254.1.33. Is there a way to add this ip to Apache root directory? I have tried to add a shortcut with in the root directory and it only works on the home network, will not via remote connection.
I need some clarification here on what you are trying to acomplish, are you trying to access the Apache website outside of the local network?
If that is the case, Apache is automatically set to listen on all network interfaces, you can check this in your virtual host configuration in the sites-enabled directory of your apache installation.
You should see something like in the 000-default.conf
You can test if apache is serving pages up correctly using the command
curl 127.0.0.1
You should see the HTML of the page being served.
If this is the case, then it's likely the firewall on your machine/router or your ISP is blocking the required ports. You can allow Apache through the firewall on Ubuntu using sudo ufw allow Apache Full
If you give me some more info in comments we can probably work this out.

Bitnami djangostack Not serving any pages degault/app

I am new to cloud jargon. I initiated a GCE instance sometime back and installed bitnami djangostack. It all worked fine.
One fine day due to some issue instance restarted and changed my server IP.On typing new IP in browser Apache2 Debian page was back.This previously showed Bitnami default page.
I restarted each service using /opt/bitnami/ctl script but apache was not running.
Searched and changed default port to 8080 and from 443 to 8443 in httpd.conf file.
Apache started. But still when I type on browser new server IP - I get connection refused error.Also cannot load any apps using http://serverip/Project/ which previously used to work.
Apache Error log says
localhost:8443:0 server certificate does NOT include an ID which matched server name.
Searched and changed below in /apache2/conf/extra/httpd-ssl.conf
ServerName to localhost from www.example.com
But nothing is working and I still get same error.
Can anyone help.

Access virtual host on apache without host redirection?

I have apache 2.4 installed on Ubuntu server 14.04 and have setup different virtual host like domain1.com,domain2.com,domain3.com. The web server is meant to be accessed only from local network. So I tried to edit /windows/syste32/drivers/hosts and added line like this
192.168.1.90 domain1.com
and can now access the domain1 from that machine by simply putting domain1.com in browser. However I wonder if I can access specific virtual host on apache without editing the hosts file, I mean entering something like this in browser
192.168.1.90/domain1.com
, but this doesn't work since apache tries to retrieve content from the default host. In other words: If I know the apache server ip and virtual host domain, can I access it via browser directly?

Apache2 - how to close port 80 entirely and force the browser to automatically use HTTPS?

I'm running the newest Debian Wheezy and I'm configuring an Apache2 server with phpMyAdmin running, not more. I have installed a self-signed certificate by:
* Removing default file in /etc/apache2/sites-available
* Modifying default-ssl file to add paths for certificate and certificate key
* Renaming default-ssl to default
* service apache2 restart
Certificate is indeed working but not quite as I have expected.
My goal is to shut down port 80 for Apache entirely and to make the browser use HTTPS automatically for any sites, including phpMyAdmin. The first problem is that I have to manually add https:// in URL to be able to open a default site from /var/www - I expected it to redirect automatically to HTTPS. The second one is phpMyAdmin not working really well with SSL. When I open http://10.0.0.8/phpmyadmin in my browser, site opens without SSL certificate and after I try to log in, it redirects me to http://10.0.0.8/phpmyadmin/index.php which results in the browser showing "Connection Refused". After opening the site with https:// instead, everything is working perfectly.
What have I done for now is I commented two first lines in ports.conf to turn off listening in port 80. Also I tried to force phpMyAdmin to use SSL by adding $cfg['ForceSSL'] = true; in config.inc.php and making a .htaccess file to redirect the user to SSL site with Redirect permanent /phpmyadmin https://10.0.0.8/phpmyadmin
How can I achieve that?
I just had the same issue. I added the following line into the default apache2 conf file for the default port 80 server. This is the conf file at /etc/apache2/sites-available/default
Redirect permanent /phpMyAdmin https://your-full-domain-name-or-ip/phpMyAdmin
Remember to restart your apache2 server with
/etc/init.d/apache2 restart
Anyone trying to visit your phpMyAdmin would then be redirected to SSL.

Where might virtual hosts be configured to use https?

I'm trying to setup a virtual host with https on a ubuntu server with a number of other virtual hosts.
None of the other virtual hosts make any explicit mention of ssl, and there are no specific host based references in the apache2.conf or httpd.conf. However when i prefix their url's with ssl they load with no problem.
My virtual host has exactly the same declarations but when prefixed by https it does not work and instead the page just seems to hang or continually load.
How might these other hosts be configured to use ssl?
Thanks,
This article helped me setup virtual hosts with https for my testing. Here is the article http://www.codealpha.net/631/name-based-virtual-hosts-with-ssl-using-apache2-on-ubuntu-lucid/