Apache allowing HTTPS inside Virtual Hosts .crf fileHow do I setup “name based” virtual hosts using Ubuntu 12.04?Apache2 - AH00112: Warning: DocumentRoot does not existApache2 Virtual Hosting ServerName in Ubuntu Server 14.04 in LAN not WorkingUnable to access remotely (LAMP issue)Apache Web Server Configuration to install Owncloud 8.2.2 on Ubuntu 14.04Redirecting url to custom directoryHow to disable non-SSL on Apache on only the host without disabling in virtual hosts?500 Internal Server Error after installing Zend framework on UbuntuUbuntu 18.04 Virtual Hosts not affecting properlyplaced conf file in sites-avaialable, document file is there in /var/www/html, enabled site, made entry of domain name and ip in /etc/hosts
Humanity loses the vast majority of its technology, information, and population in the year 2122. How long does it take to rebuild itself?
Possible Leak In Concrete
My story is written in English, but is set in my home country. What language should I use for the dialogue?
Informing my boss about remarks from a nasty colleague
Meaning of "SEVERA INDEOVI VAS" from 3rd Century slab
Dot in front of file
Does this AnyDice function accurately calculate the number of ogres you make unconcious with three 4th-level castings of Sleep?
What is IP squat space
Counting certain elements in lists
What has been your most complicated TikZ drawing?
Happy pi day, everyone!
Why do Australian milk farmers need to protest supermarkets' milk price?
What does it mean to make a bootable LiveUSB?
Rules about breaking the rules. How do I do it well?
Calculus II Professor will not accept my correct integral evaluation that uses a different method, should I bring this up further?
Be in awe of my brilliance!
How could a scammer know the apps on my phone / iTunes account?
Co-worker team leader wants to inject his friend's awful software into our development. What should I say to our common boss?
How do anti-virus programs start at Windows boot?
Is it possible that AIC = BIC?
Does splitting a potentially monolithic application into several smaller ones help prevent bugs?
Why doesn't the EU now just force the UK to choose between referendum and no-deal?
Schematic conventions for different supply rails
What is a good source for large tables on the properties of water?
Apache allowing HTTPS inside Virtual Hosts .crf file
How do I setup “name based” virtual hosts using Ubuntu 12.04?Apache2 - AH00112: Warning: DocumentRoot does not existApache2 Virtual Hosting ServerName in Ubuntu Server 14.04 in LAN not WorkingUnable to access remotely (LAMP issue)Apache Web Server Configuration to install Owncloud 8.2.2 on Ubuntu 14.04Redirecting url to custom directoryHow to disable non-SSL on Apache on only the host without disabling in virtual hosts?500 Internal Server Error after installing Zend framework on UbuntuUbuntu 18.04 Virtual Hosts not affecting properlyplaced conf file in sites-avaialable, document file is there in /var/www/html, enabled site, made entry of domain name and ip in /etc/hosts
I am setting up an UBUNTU 18.04 enviroment with apache, mysql, phpmyadmin etc etc.
I need to allow HTTPS access for URL rewrites, currently HTTPS crash when i enter a URL which has been rewritten in .htaccess
HTTPS:
If i acces through HTTPS, only https://www.mysite.com works, if i try to access https://mysite.com/content/1 the website crash but if i try to access https://www.mysite.com?page=content&id=1 everything works and there is a HTTPS connection
HTTP:
If i access through HTTP there is no problems i can access all domains e.g http://mysite.com/user and http://mysite.com/content/1
I found different tutorials and guides and i've come to the conclusion that i need to edit the Virtusl Hosts .cfg file
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I need think that i need to get these 2 parts
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Where do i get these .crt and .key files?
Do they have anything to do with SSL private/public keys? because these two files i have, but they do not have .crt and .key extensions HTTPS is however is enabled.
Whole Config File
<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 whattodoonline.com
ServerAlias www.whattodoonline.com
# Redirect permanent / https://www.mysite.com/
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</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>
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
.htaccess file
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3&e=$4 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?page=$1&c=$2 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)$ index.php?page=$1 [NC,L]
server apache2
New contributor
add a comment |
I am setting up an UBUNTU 18.04 enviroment with apache, mysql, phpmyadmin etc etc.
I need to allow HTTPS access for URL rewrites, currently HTTPS crash when i enter a URL which has been rewritten in .htaccess
HTTPS:
If i acces through HTTPS, only https://www.mysite.com works, if i try to access https://mysite.com/content/1 the website crash but if i try to access https://www.mysite.com?page=content&id=1 everything works and there is a HTTPS connection
HTTP:
If i access through HTTP there is no problems i can access all domains e.g http://mysite.com/user and http://mysite.com/content/1
I found different tutorials and guides and i've come to the conclusion that i need to edit the Virtusl Hosts .cfg file
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I need think that i need to get these 2 parts
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Where do i get these .crt and .key files?
Do they have anything to do with SSL private/public keys? because these two files i have, but they do not have .crt and .key extensions HTTPS is however is enabled.
Whole Config File
<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 whattodoonline.com
ServerAlias www.whattodoonline.com
# Redirect permanent / https://www.mysite.com/
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</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>
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
.htaccess file
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3&e=$4 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?page=$1&c=$2 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)$ index.php?page=$1 [NC,L]
server apache2
New contributor
add a comment |
I am setting up an UBUNTU 18.04 enviroment with apache, mysql, phpmyadmin etc etc.
I need to allow HTTPS access for URL rewrites, currently HTTPS crash when i enter a URL which has been rewritten in .htaccess
HTTPS:
If i acces through HTTPS, only https://www.mysite.com works, if i try to access https://mysite.com/content/1 the website crash but if i try to access https://www.mysite.com?page=content&id=1 everything works and there is a HTTPS connection
HTTP:
If i access through HTTP there is no problems i can access all domains e.g http://mysite.com/user and http://mysite.com/content/1
I found different tutorials and guides and i've come to the conclusion that i need to edit the Virtusl Hosts .cfg file
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I need think that i need to get these 2 parts
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Where do i get these .crt and .key files?
Do they have anything to do with SSL private/public keys? because these two files i have, but they do not have .crt and .key extensions HTTPS is however is enabled.
Whole Config File
<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 whattodoonline.com
ServerAlias www.whattodoonline.com
# Redirect permanent / https://www.mysite.com/
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</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>
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
.htaccess file
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3&e=$4 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?page=$1&c=$2 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)$ index.php?page=$1 [NC,L]
server apache2
New contributor
I am setting up an UBUNTU 18.04 enviroment with apache, mysql, phpmyadmin etc etc.
I need to allow HTTPS access for URL rewrites, currently HTTPS crash when i enter a URL which has been rewritten in .htaccess
HTTPS:
If i acces through HTTPS, only https://www.mysite.com works, if i try to access https://mysite.com/content/1 the website crash but if i try to access https://www.mysite.com?page=content&id=1 everything works and there is a HTTPS connection
HTTP:
If i access through HTTP there is no problems i can access all domains e.g http://mysite.com/user and http://mysite.com/content/1
I found different tutorials and guides and i've come to the conclusion that i need to edit the Virtusl Hosts .cfg file
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I need think that i need to get these 2 parts
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
Where do i get these .crt and .key files?
Do they have anything to do with SSL private/public keys? because these two files i have, but they do not have .crt and .key extensions HTTPS is however is enabled.
Whole Config File
<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 whattodoonline.com
ServerAlias www.whattodoonline.com
# Redirect permanent / https://www.mysite.com/
DocumentRoot /var/www/html
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</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>
<VirtualHost *:443>
ServerName <myip>
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
<Directory /var/www/html>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
.htaccess file
RewriteEngine On
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3&e=$4 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?page=$1&c=$2&d=$3 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?page=$1&c=$2 [NC,L]
RewriteCond %REQUEST_FILENAME !-f
RewriteCond %REQUEST_FILENAME !-d
RewriteRule ^([^/]+)$ index.php?page=$1 [NC,L]
server apache2
server apache2
New contributor
New contributor
New contributor
asked 2 hours ago
ii iml0sto1ii iml0sto1
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
ii iml0sto1 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125774%2fapache-allowing-https-inside-virtual-hosts-crf-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
ii iml0sto1 is a new contributor. Be nice, and check out our Code of Conduct.
ii iml0sto1 is a new contributor. Be nice, and check out our Code of Conduct.
ii iml0sto1 is a new contributor. Be nice, and check out our Code of Conduct.
ii iml0sto1 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125774%2fapache-allowing-https-inside-virtual-hosts-crf-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown