Wordpress Ubuntu redirects DigitalOcean Issue - wordpress

Good day:
I have my website in digitalOcean, in Ubuntu Droplet. I have both Wordpress site and CakePHP sites. CakePHP is working well.
Wordpress I have a little issue:
If I access for example www.mywebpage.cl then it shows my "Apache2 Ubuntu Default Page" page (apache1.jpg attached):
If I access on my browser:
http://www.mywebpage.cl/alianzaWordpress/datos1/ then it goes to my webpage (mysite.jpg).
I want to go to www.mywebpage.cl and automatically directs to http://www.mywebpage.cl/alianzaWordpress/datos1/
I have tried to modify /etc/apache2/sites-available/000-default.conf with no success.
I have tried set DocumentRoot as /var/www/html/alianzaWordpress/datos1 or but still not working properly
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www/html
#DocumentRoot /var/www/html/alianzaWordpress/datos1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
After I modify I do "a2enmod rewrite ; service apache2 restart"
enter image description here
Please any recommendation is fine for me, also I am using permalinks "post names" in my site. (permalinks.jpg)
Regards,
Felipeenter image description here
Pictures

I found something easy to do, thanks anyway.
I modifed this file /var/www/html/index.html with this information to redirect to the folder I wanted:
<meta http-equiv="Refresh" content="0; url=http://www.mywebpage.cl/alianzaWordpress/datos1/">
Sorry for easy question, now I learn, Regards,
Felipe

Related

wordpress site working locally but not from the domain

My wordpress site is working locally in my wamp server, this is hosted on an ec2 instance and domain is maintained in Route 53\cloudfare. The domain is working when i checked it using mxtoolbox. The site was working and live till the time i changed my host file in the server. I removed the host file entries accidentally thinking it is a dev site, however i restored it but still the site is not working and i am getting only the "TOO MANY REDIRECTS" error. The following is the current windows host file details
#
127.0.0.1 localhost
::1 localhost
127.0.0.1 mydomain.com
::1 mydomain.com
I restarted the server and WAMP multiple times but it is not working.
The following is my virtualhost configuration
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain.com
DocumentRoot "c:/wamp/www/sitefolder"
<Directory "c:/wamp/www/sitefolder/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride all
Require all granted
</Directory>
</VirtualHost>`
Clean your cache and browser history first, then try doing it below:
Open your wordpress admin panel --> Settings--> General --> Make sure it points to the correct domain. --> Save
Or go to the wp-config.php file (Try this if the first method fails / can't be accessed)
add:
define('WP_HOME','http://YourDomain.com');
define('WP_SITEURL','http://YourDomain.com');
or
Try to remove or rename default .htaccess
or
Try to disable the plugin (renaming the plugin folder in the "wp-content/plugin/plugin-folder-name" will non-active that plugin. This might solve the problem if the constraints are due to the plugin)
That's a number of ways when I resolve the ERR_TOO_MANY_REDIRECTS problem. Goodluck

VirtualHost sets the url as abc.com/subdirectory/

<VirtualHost *:80>
ServerAdmin xxx#abc.com
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /var/www/html/wordpress/
<Directory /var/www/html/wordpress/>
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
ErrorLog /var/logs/error_wp.log
CustomLog /var/logs/access_wp.log combined
</VirtualHost>
I had issues with Wordpress url, then I changed the url to abc.com and now Wordpress renders all pages correctly.
But when it comes to homepage, abc.com, it redirects to abc.com/wordpress/
So whenever I type abc.com in a browser, it redirects to abc.com/wordpress/
And it says "Oops! That page can’t be found."
Wonder where the issue might be.
I'm using default .htaccess for Wordpress. I use a static homepage. Except homepage all other pages work properly. I am able to login using abc.com/wp-admin/
Thanks in advance.
Your directory block should list the path relative to the root, not the absolute path. See if this fixes it:
<Directory />
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
Also, you shouldn't include a trailing slash with your document root.
DocumentRoot /var/www/html/wordpress
Here's the entire corrected config file:
<VirtualHost *:80>
ServerAdmin xxx#abc.com
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /var/www/html/wordpress
<Directory />
Options All
AllowOverride All
order allow,deny
allow from all
</Directory>
ErrorLog /var/logs/error_wp.log
CustomLog /var/logs/access_wp.log combined
</VirtualHost>
The problem was pretty silly. I had set a static page as homepage, which had an entry in db as abc.com/wordpress/. So everytime I click homepage, it would search for abc.com/wordpress/wordpress, which doesn't actually exist.

Error 403 when trying to access localhost

Good morning all.
I run a small in office dev (xampp) server for the build of static and WordPress websites on my Ubuntu machine.
I use vhosts for which two are workingabsolutly fine. However, I have another which for some reason keeps failing when I try to load the site.
My Xampp install is a typical /opt/lampp install, nothing unique or special.
My vhosts File
##Summerschool Development Version (which works fine)
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/summerschooldev"
ServerName summerschoolforteensuk.com
<Directory "/opt/lampp/htdocs/summerschooldev/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
##Summerschool old website (which works fine)
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/summerschool"
ServerName summerschoolold.com
<Directory "/opt/lampp/htdocs/summerschool/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
##scp old website throws error 403 You don't have permission to access / on this server..
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/scp"
ServerName scpold.com
<Directory "/opt/lampp/htdocs/scp/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Now my hosts file
127.0.0.1 summerschoolforteensuk.com
127.0.0.1 summerschoolold.com
127.0.0.1 scpold.com
From what I can see, everything seems to be working fine. Im relativly new to working like this but poor internet speed at my office means I have to. Im guessing that there is not error here as the other two sites work fine.
Is there something Im missing if not where would I look next.
Thanks
I seem to have solved this by installing wordpress locally and importing my database and wp-content folder into the install and using the full domain for the server name and host.
Dont think this has solved my issue but its working now.

Can't get to subsites. Wildcard-subdomains probably misconfigured in Apache

I'm building a portal for the organization I'm working at.
The portal is a Wordpress site using Wampserver 2.5, intalled on a Win server 2008 R2.
It's working fine and accesible from other machines over the intranet, thanks to the helpful and patient RiggsFolly.
But now, I have changed it into a network of sites so that I can build sub-portals for the different departments in my organization.
During that change Wordpress gave this warning message: Warning! Wildcard DNS may not be configured correctly!
Wordpress has a page explaining how to configure wildcard subdomains on Apache - http://codex.wordpress.org/Configuring_Wildcard_Subdomains.
I tried following it but the explanation lacks details and I'm probably doing something wrong.
On the machine where the servers and site are installed, when I write http://hipo (hipo is the current site name) in the browser's address bar, I get to the site fine.
But when I write http://depa.hipo (depa is a subsite I created successfully), the address changes into http://www.depa.hipo/ and the browser says it didn't find a server at that address.
I have probably set the ServerAlias line wrong in httpd-vhosts.conf, and also I didn't add the line *.example.com A 192.0.43.10, or in my case *.hipo A <rightIP>, cause I wasn't sure where to add it in the file.
This is my httpd-vhosts.conf file. Your help is appreciated!
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName subsites.hipo
ServerAlias *.hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
This definition does not have a ServerAlias so try adding one like this:
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/hipo"
ServerName hipo
ServerAlias www.hipo
<Directory "c:/wamp/www/hipo">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

Redmine in subfolder. Drupal (in main folder) handles all requests

I have Redmine in subfolder /var/www/redmine and Drupal in folder /var/www/
When I go to URL mysite.com/redmine, Redmine shows ok, but mysite.com/redmine/login is (over)handled by Drupal.
Apache config is as follows
<VirtualHost *:80>
ServerAdmin webmaster#localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
RailsBaseURI /zoo-redmine
PassengerResolveSymlinksInDocumentRoot on
Options Indexes FollowSymLinks -MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
It seems a Drupal configuration issue. Try to look in your Drupal configuration panel to exclude from Drupal's login system the /redmine/ subfolder. I can't point you to the exact url because my drupal configuration uses CAS, but it is probably in
Start -> Administration -> Configuration -> People
It was as simple as RewriteRule ^zoo-redmine - [L] before other rewrites in .htaccess
This code exits .htaccess file if encounters zoo-redmine string and don't allow Drupal to readdress this request to index.php with arguments

Resources