Author Topic: directory change when i change port  (Read 11680 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
directory change when i change port
« on: March 29, 2015, 03:45:04 PM »
Hello

I'm using CWP version: 0.9.8.4 on Centos 6

I try to user nginx as reverse proxy

my site is located in /home/XXX/public_html but when i change the port to 81 it load an other directory

i tried to add

<VirtualHost 127.0.0.1:81>
   ServerName www.yourwebsite.com
   ServerAlias yourwebsite.com
   DocumentRoot /home/xxx/public_html
       <Directory "/home/xxx/public_html">
               Options FollowSymLinks -Includes
               AllowOverride All
               Order allow,deny
               Allow from all
       </Directory>
       RewriteEngine on
</VirtualHost>


but it load always index.html stored in hdocs

I found out Apache is using another root path as CentOS Web panel is expecting. CWP is storing the config file in: /usr/local/apache/conf/httpd.conf

But Apache is reading the configuration in /etc/httpd/conf/httpd.conf:

Any adea please
« Last Edit: March 29, 2015, 03:52:53 PM by sudogo »

Re: directory change when i change port
« Reply #1 on: March 30, 2015, 08:40:36 AM »

Offline
*
Re: directory change when i change port
« Reply #2 on: March 30, 2015, 10:40:07 PM »
Hello

You made day ,thank you

 curl -X HEAD -i http://www.mywebsite.com
HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.2
Date: Mon, 30 Mar 2015 22:37:08 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: keep-alive
Location: http://mywebsite.com/
X-Cache: HIT from Backend

but i have an other issue now with my rtmp module
when i add rtmp code

rtmp {
    server {
        listen 1935;
 
        chunk_size 4000;
 
        # video on demand for flv files
        application vod {
            play /var/flvs;
        }
 
        # video on demand for mp4 files
        application vod2 {
            play /var/mp4s;
        }
    }
}

in nginx.conf i get error :
rtmp directive is not allowed here
any advise please

Re: directory change when i change port
« Reply #3 on: March 31, 2015, 12:06:41 PM »
You need to compile rtmp modules with nginx before using it in nginx.conf file.

Offline
*
Re: directory change when i change port
« Reply #4 on: March 31, 2015, 10:07:45 PM »
Hello

thank you very much i have already rtmp module

here is the nginx output

sudo /usr/sbin/nginx -V
Code: [Select]
nginx version: nginx/1.7.11
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/sbin/nginx --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --user=nobody --group=nobody --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-pcre=/usr/local/src/pcre-8.36 --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-file-aio --with-mail_ssl_module --with-http_perl_module --with-http_flv_module --with-http_gunzip_module --with-http_image_filter_module --with-http_mp4_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module --with-http_dav_module --with-http_xslt_module --with-mail --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-mail_ssl_module --add-module=/usr/local/src/nginx-master/nginx-modules/nginx-rtmp-module --add-module=/usr/local/src/nginx-master/nginx-modules/nginx-upload-progress-module --add-module=/usr/local/src/nginx-master/nginx-modules/ngx_devel_kit

Any idea

Re: directory change when i change port
« Reply #5 on: April 01, 2015, 03:02:02 AM »
I would suggest you to contact module developer to guide your further or contacting your server admin to assist you.