11

Solved it! Running sudo apache2ctl -S returned the following: VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:80 is a NameVirtualHost default server noelforte.com (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost noelforte.com (/etc/apache2/sites-enabled/000-default:1) ...


8

I had a similar issue and it turns out that Apache didn't like the ErrorLog and CustomLog lines in the VirtualHost container. I commented them out and service started without a problem. I'm guessing this has something todo with permissions in httpd.conf


6

Yes you can, The first VirtualHost will point to your Wordpress site, the other VirtualHosts will be setup as Reverse Proxy to your other internal devices. Example: <VirtualHost *:443> Servername fw.me.com ProxyPass / https://192.168.1.1:8443/ ProxyPassReverse / https://192.168.1.1:8443/ </VirtualHost> See http://httpd.apache.org/...


4

For anyone running into this issue in the future, don't disable SElinux, learn how to use it. Disabling it is almost like removing all safety off a firearm because the trigger won't work when you try to shoot. This is the correct way to approach this issue: `chcon -t httpd_sys_rw_content_t /var/www/html -R` Will allow apache permissions to read and write ...


4

You added SAN to the CSR but you didn't tell ca to include extensions from the CSR in the certificate. See https://security.stackexchange.com/questions/150078/missing-x509-extensions-with-an-openssl-generated-certificate or the man page for ca also on the web at copy_extensions EDIT: You also need to specify x509_extensions in the ca config, or equivalent ...


4

In your virtual host configurations, you are using name based virtual hosts as you specify ServerName. This means that a configuration would only load when the "Host" header in the client request matches. The default behavior of Apache when it cannot match the requested host with any configured virtual hosts is to load the first configured virtual host it ...


4

If you look in your httpd.conf, search for Include and/or IncludeOptional. Your (well, your distro's) httpd.conf is what instructs Apache to load conf.d; it thus also determines when its loaded vs. the directives in httpd.conf. What happens if you have two of the same directives in the config is complicated. It depends, at least, on the directive; some (e.g....


4

Could you try to add an additional slash at the end of you ProxyPass, like: ProxyPass http://127.0.0.1:8080/ ?


3

You may want to read the Apache2 documentation. I was told Apache2 would read these files one-by-one in alphabetic order to create virtual hosts, is this correct? Virtual hosts are not read in /etc/apache2/sites-available but in /etc/apache2/sites-enabled. That said, apache2 uses the libc, and according to gnu.org, The order in which files appear in a ...


3

For HTTP to redirect to HTTPS you need to (the first 3 steps you probably already did): Allow port 80 in your router. Forward port 80 to your server. Punch hole in your firewall: sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT Define VirtualHost for port 80 (as well as for 443): <VirtualHost *:80> ServerName erichermansson....


3

Try to fully reboot your system, it looks like it is trying to kill a process which no longer exists. sudo reboot When the system is fully rebooted, try to run the command again. sudo systemctl restart httpd This should work, if it doesn't, please post the 'journalctl -xn' output.


3

The first two lines of httpd -S output are quite explicit indicating that you didn't create the proper directory structure for (/home/www/apecenergy.co.uk/public_html and /home/www/rangayoga.co.uk/public_html). This alone is more than enough to get a HTTP 404 error.


3

It's not recommended to allow the user home directory to be directly accessed; if you want to allow per-user publishing then using a subdirectory such as public_html is more common. Apache needs to be told about ~username type syntax. This is done with the UserDir directive. eg UserDir public_html Now you also need to permit this access as well, so you ...


3

Create two VirtualHosts (it would be good practice to have them in separated files) <VirtualHost *:80> ServerName pathfinder.dev ServerAlias www.pathfinder.dev DocumentRoot /var/www/pathfinder <Directory /var/www/pathfinder> AllowOverride All Order Allow,Deny Allow from All #... </...


3

Your logs are telling you exactly why Apache is unable to start: AH00091: httpd: could not open error log file /var/www/motomart.my. AH00015: Unable to open logs (21)Is a directory: Make sure that you are not trying to use a directory as a log file in yout Apache configuration.


3

When a web server is processing dynamically-generated pages and needs to generate a fully-qualified URL that refers back to itself, it needs to know what to put into the hostname/address part of the URL. If there is nothing more specific defined, the default is usually "localhost" because it's the safe choice, and it works for quick test setups that are ...


3

EDIT: Debugging the user setup, it was found with netstat there is already a process using 1996/TCP: netstat -nlp | grep 1996 tcp 0 0 0.0.0.0:1996 0.0.0.0:* LISTEN 4729/python So the configuration examples, were changed to 1997/TCP. Apache/mod_ssl have to be told 1997/TCP and 1980/TCP are HTTPS ports. By default 443/TCP is already known, but any others ...


2

If you are using vhost internaly it is always better solution to make vhost configuration with different ports, so in this case you can setup nagios domain on 8083 port: first step: In httpd.conf you need to spicify listening ports: Listen 8080 Listen 80 Listen 8083 In httpd-vhosts.conf add a NameVirtualHost for every virtual host you want to add. ...


2

Apache works fine even without setting up Virtual Hosts. Virtual Host(s) are needed only if you want to set up additional webservers on the same machine, and these can be either: Port-based Virtual Hosts (webservers running on a different port than 80) IP-based Virtual Hosts (webservers running on a different IP) Name-based Virtual Host (webserver running ...


2

The issue turned out not to be file /folder permissions as such, but the security context of the non-working domain. From my limited understanding, in order for Apache to serve up files, the files / folders need to be configured to run under the httpd_sys_content_d context. My 'mistake' was the non-working domain had been mv'd into the Apache content ...


2

For apache it doesn't matter, you simply define a DocumentRoot pointing to the directory where the files are. From a practical perspective it might be good to follow the conventions of the distribution you're using, as things like SELinux and possibly AppArmor may have default policies that require modification when Apache is pointed to non-default ...


2

Configure a VirtualHost as all the others and configure the ProxyPass and ProxyPassReverse for this specific domain: Servername www.somedomain.com ProxyPass / http://internal-web-server/ ProxyPassReverse / http://internal-web-server/ See http://httpd.apache.org/docs/2.2/mod/mod_proxy.html for details


2

Keyword: SNI (Server Name Indication) Looks like either your server or your client is missing SNI support, see https://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI To test whether your server is returning SNI header information you may try openssl s_client -servername www.SERVERNAME.com -tlsextdebug -connect www.YOURSERVER.com:443 2>/dev/null | ...


2

It appears to me that the NOIP service is calling your server via a frame, and the frame source is your server's IP address, rather than a domain name: <frame src="http://68.101.98.197:8080" name="redir_frame" frameborder=0> Your Apache server isn't receiving the server name with the request. Since the conf files are loaded in alphabetical order, ...


2

Make sure to allow ports 80 and 443 in your router. Make sure to forward ports 80 and 443 to your server. Make sure to have punched holes in your firewall: sudo iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT sudo iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT Define VirtualHost for port 443 (as well as for 80): <VirtualHost *:80> ... ...


2

there is a config file on /etc/httpd/conf.d called ssl.conf (or something similar) holding on the default ssl config. You have three options then... edit that file remove that file (not recommended) use a named virtual host . Please keen in mind to copy the Listen 443 to your file. Let me know if that helps


2

You need to set up a proxy directive for Apache to do this. Look at the ProxyPass directive on Apache's mod_proxy page for specifics.


2

I would definetly do this with a Nginx reverse proxy. You can have nginx on the same machine as your apache server and you can configure it to redirect requests to the secondary server based on the url. In this example, apache has been (previously) configured to serve example.com on port 8080, while edu.example.com is served on x.x.x.100:80 server { ...


Only top voted, non community-wiki answers of a minimum length are eligible