짧은주소가 적용이 안됩니다. 채택완료
서버에서
abcd.com/gnuboard폴더에 그누보드5.4.2.5를 세팅했습니다. (root계정)
그누보드 설치초기부터 짧은주소가 적용이 되지 않았지만, apache 설정이 문제가 있거니 싶어 지금까지 그냥 있었습니다.
그누보드메뉴얼 (https://sir.kr/manual/g5/286">https://sir.kr/manual/g5/286) 을 참고하다보니 apache 설정 자체도 문제가 없었고 문법도 정상입니다.
rewrite module 이 활성화가 체크를 하면 에러메세지는 뜨지 않는데,
abcd.com/gnuboard/go 폴더로 접속을 하면

처럼 나타납니다.
==== httpd.conf의 내용 ====
ServerRoot "/etc/httpd"
Listen 80
LoadModule ruid2_module /usr/lib64/httpd/modules/mod_ruid2.so
Include conf.modules.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html"
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
# Further relax access to the default document root:
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.html index.php
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
</IfModule>
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig /etc/mime.types
#AddType application/x-gzip .tgz
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
#
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule mod_rewrite.c>
rewriteEngine On
</IfModule>
<Directory />
AllowOverride All
</Directory>
#
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional conf.d/*.conf
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName domain.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/userid/html
ServerName subdomain.domain.com
</VirtualHost>
==== httpd.conf의 내용 ====
그리고, .htaccess는
abcd.com/
abcd.com/gnuboard/
abcd.com/gnuboard/test
에 복사를 했습니다.
==== .htaccess의 내용 ====
#### 그누보드5 rewrite BEGIN #####
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^content/([0-9a-zA-Z_]+)$ bbs/content.php?co_id=$1&rewrite=1 [QSA,L]
RewriteRule ^content/([^/]+)/$ bbs/content.php?co_seo_title=$1&rewrite=1 [QSA,L]
RewriteRule ^rss/([0-9a-zA-Z_]+)$ bbs/rss.php?bo_table=$1 [QSA,L]
RewriteRule ^([0-9a-zA-Z_]+)$ bbs/board.php?bo_table=$1&rewrite=1 [QSA,L]
RewriteRule ^([0-9a-zA-Z_]+)/([^/]+)/$ bbs/board.php?bo_table=$1&wr_seo_title=$2&rewrite=1 [QSA,L]
RewriteRule ^([0-9a-zA-Z_]+)/write$ bbs/write.php?bo_table=$1&rewrite=1 [QSA,L]
RewriteRule ^([0-9a-zA-Z_]+)/([0-9]+)$ bbs/board.php?bo_table=$1&wr_id=$2&rewrite=1 [QSA,L]
</IfModule>
#### 그누보드5 rewrite END #####
==== .htaccess의 내용 ====
그런데도 짧은주소가 적용이 안됩니다.
무었이 문제인가요?
감사합니다.
답변 4개
htaccess가 안먹는것같은데
기본폴더설정의
AllowOverride none 부분을
AllowOverride All로 한번 바꿔줘보세요
설정후 아파치 재시작...해보시고요
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
드디어 해결이 됐습니다.
제 실수로 헤메고 다녔네요~~
apache 설정에도 문제가 없었고, 모듈활성화에도 문제가 없었어요~~
.htaccess파일을 생성할 때 문제가 있었나봐요~~
그리고, htacess 파일을 그누보드 폴더에 삽입하니까 잘 돼네요~~
해결에 도움주신 @https://sir.kr/bbs/profile.php?mb_id=BlueAngel" onclick="return false;" rel="nofollow" target="_blank" title="BlueAngel 자기소개">BlueAngel 님께 감사드립니다.^^
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
도움 주셔서 감사합니다.^^
댓글을 작성하려면 로그인이 필요합니다.
<IfModule mod_rewrite.c> rewrite모듈이 활성화되어있다면인데
활성화가 안되서 안먹는것같기도하고
https://hiseon.me/server/apache-rewrite-examples/">https://hiseon.me/server/apache-rewrite-examples/
참고해보세요
답변에 대한 댓글 1개
알려주신 링크타고 들어갔더니 모듈활성화명령 a2enmod가 실행이 안됩니다.
파일을 찾아봐도 없네요~~
웹에 a2enmod 설치에 대한 정보도 없습니다.
혹시... 리눅스 다시 설치해야..... 할...까...요?ㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
자유게시판 연결해봤습니다.
Not Found
The requested URL /gnuboard/free was not found on this server.
메세지만 뜨네요~~
혹시 질문지에 기록한 내용 외에 확인해봐야 할 곳이 있나요?