Jump to content

Is it wordpress or misconfigured when compiling PHP?


Recommended Posts

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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.