aprasmac Posted February 9, 2009 Share Posted February 9, 2009 Hi all, I'm trying to run wordpress on a non standard port (let's say port 8000). When i go to http://wordpress-url:8000 i always redirected to http://wordpress-url. I checked with curl -I wordpress-url:8000 and got "HTTP/1.1 301 Moved Permanently". And when i configured rewrite and proxy in my apache vhost configuration like this: RewriteEngine On RewriteCond %{SERVER_PORT} !=8000 RewriteRule ^/(.*) http://%{HTTP_HOST}:8000/$1 [P,QSA,L] I got infinite loop error only for folder or URL where there's wordpress inside. This is as if wordpress settings (URL and Blog URL in Options => General) is redirecting to the port. Because if i change this setting to http://wordpress-url:8000 i get "HTTP/1.1 200". Wordpress official forum trheads also mentioned the same behaviour http://wordpress.org/support/topic/159360 Also, the behaviour is different with phpBB2 and phpBB3. Although phpBBs have similar URL settings (saved in database), but they're not redirecting to port 80. And with the apache mod_rewrite setting above, i can run phpBB on port 8000 successfully. On the other hand, i have successfully running wordpress on a non standard port, on a shared webhosting wihtout any problem. Is there some options should i check when compiling PHP so the wordpress is bahaving like that? Here were my command when compiling PHP: './configure' '--prefix=/usr/local/lsws/lsphp5' '--with-litespeed' '--with-mysqli=/usr/bin/mysql_config' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-libxml' '--enable-zip' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-zlib-dir=/usr' '--enable-sqlite-utf8' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr Sorry if i'm confusing you. I just want to know why wordpress is redirecting port and i would like to run wordpress on port 8000 (proxy it from port 80). Thanks, Aprasmac. Quote Link to comment https://forums.phpfreaks.com/topic/144451-is-it-wordpress-or-misconfigured-when-compiling-php/ Share on other sites More sharing options...
wildteen88 Posted February 9, 2009 Share Posted February 9, 2009 I dont think its to do with how PHP is configured/compiled more to do with your HTTP server which I'm assuming is Apache. You should check over Apaches configuration Quote Link to comment https://forums.phpfreaks.com/topic/144451-is-it-wordpress-or-misconfigured-when-compiling-php/#findComment-758314 Share on other sites More sharing options...
aprasmac Posted February 9, 2009 Author Share Posted February 9, 2009 Any idea what Apache settings should i check? If it's on Apache side, why i can do the same thing to phpBB and not get redirected? Thanks, Aprasmac Quote Link to comment https://forums.phpfreaks.com/topic/144451-is-it-wordpress-or-misconfigured-when-compiling-php/#findComment-758492 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.