Virtual Host And Certbot in RHEL7: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 63: | Line 63: | ||
RewriteCond %{SERVER_NAME} =www.api.medisys.com.my | RewriteCond %{SERVER_NAME} =www.api.medisys.com.my | ||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | ||
</source> | |||
<source lang="ini"> | |||
f='html docs soft';\ | |||
for s in *.medisys.com.my;do for d in $f;do \ | |||
h="<html>\n<head><title>$s/$d</title></head>\n"; | |||
h="$h<body><h1>Welcome to, $s/$d</h1></body>\n</html>"; | |||
echo -e "$h" >> "$s/$d/index.html"; | |||
done;done | |||
</source> | </source> | ||
Line 68: | Line 77: | ||
<source lang="ini"> | <source lang="ini"> | ||
f='html docs soft';\ | f='html docs soft';\ | ||
for s in *. | for s in *.rufaida.com.my;do for d in $f;do \ | ||
h="<html>\n<head><title>$s/$d</title></head>\n"; | h="<html>\n<head><title>$s/$d</title></head>\n"; | ||
h="$h<body><h1>Welcome to, $s/$d</h1></body>\n</html>"; | h="$h<body><h1>Welcome to, $s/$d</h1></body>\n</html>"; |
Revision as of 02:45, 11 November 2019
httpd.conf
vim /etc/httpd/conf/httpd.conf
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. [email protected]
#
ServerAdmin [email protected]
# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf
IncludeOptional /ihe/etc/httpd/conf.sites.d/*.conf
ServerName 100.43.10.200
# mkdir -p /etc/httpd/conf.sites.d/
# mkdir -p /var/www/
# create folder inside /ihe mount point
mkdir -p /ihe/etc/httpd/conf.sites.d/
mkdir -p /ihe/var/www
|
cd /ihe/var/www/;\
p='api cdn dev hl7';\
for s in $p;\
do d='html docs soft';for f in $d;\
do mkdir -p "$s.medisys.com.my/$f";\
done;
done
|
cd /ihe/var/www/;\
p='api cdn dev hl7';\
for s in $p;\
do d='html docs soft';for f in $d;\
do mkdir -p "$s.rufaida.com.my/$f";\
done;
done
|
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{SERVER_NAME} =api.medisys.com.my [OR]
RewriteCond %{SERVER_NAME} =www.api.medisys.com.my
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
f='html docs soft';\
for s in *.medisys.com.my;do for d in $f;do \
h="<html>\n<head><title>$s/$d</title></head>\n";
h="$h<body><h1>Welcome to, $s/$d</h1></body>\n</html>";
echo -e "$h" >> "$s/$d/index.html";
done;done
|
f='html docs soft';\
for s in *.rufaida.com.my;do for d in $f;do \
h="<html>\n<head><title>$s/$d</title></head>\n";
h="$h<body><h1>Welcome to, $s/$d</h1></body>\n</html>";
echo -e "$h" >> "$s/$d/index.html";
done;done
|