deathline deathline - 1 year ago 56
PHP Question

After I set my wordpress server elastic ip in aws ec2,my wordpress can't request static file

I build a wordpress in aws EC2,everything goes well until I bind a Elastic IP
to my wordpress server. The question is wordpress static file request is still the default aswec2 public dns, but I can see the page without css/js.

Web server:apache2;Database: aws RDS(mysql);php version:5.3.10;My
wordpress ;

Because before I bind a Elastic IP, I visit the aws public
,my wordpress blog is ok!

I feel my apache2 configuration maybe wrong, the configuration file is as follows:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/wordpress
<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /var/www/wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

I have no idea about php, maybe my question is fool, but I hope someone can give a help.

Answer Source

You probably installed wordpress while you didn't have the elastic IP, so Wordpress remembered your URL as ec2-...

There is a tutorial for changing the URL of your Wordpress installation here. Follow it, using as your URL.