도메인 연결을 했는데 서브디렉토리로 연결이 됩니다.
본문
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# 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. www.simsimhalddae.net
DocumentRoot /home/net
ScriptAlias /cgi-bin /home/net/cgi-bin
<Directory /home/net>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerName myhome3476.sshdtorrent.com
ServerAlias myhome3476.sshdtorrent.com
DocumentRoot /home/myhome3476
ScriptAlias /cgi-bin /home/myhome3476/cgi-bin
<Directory /home/myhome3476>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<Directory /var/www/html/owncloud>
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerName owncloud.simsimhalddae.com
ErrorLog logs/owncloud-error_log
CustomLog logs/owncloud-access_log common
DocumentRoot "/var/www/html/owncloud/"
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite SSLv3:TLSv1:+HIGH:!SSLv2:!MD5:!MEDIUM:!LOW:!EXP:!ADH:!eNULL:!aNULL
SSLCertificateFile /etc/letsencrypt/live/owncloud.simsimhalddae.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/owncloud.simsimhalddae.com/privkey.pem
ServerName owncloud.simsimhalddae.com
DocumentRoot "/var/www/html/owncloud/"
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
ErrorLog logs/owncloud-ssl-error.log
CustomLog logs/owncloud-sslaccess.log combined
</VirtualHost>
</IfModule>
제 httpd.conf 파일 내용인데요.
myhome3476.simsimhalddae.com
으로 연결을 하면
sshdtorrent.com/myhome3476
내지
simsimhalddae.com/myhome3476
으로 접속이 됩니다.
왜 이런가요? 어느 파일을 손봐야 되지요?
도저히 생각을 해봐도 답이 안나옵니다.
dns, /etc/hosts, etc/httpd/conf/httpd.conf, 포트포워딩
건드려 봐도 답이 안나오네요.
답변 2
혹시 myhome3476.simsimhalddae.com 이곳으로 접근한 도메인 index 파일에서 포워딩 하고 있지 않은지 확인해 보시고요
네임서버 문제였답니다. ㅠ.ㅠ