Unable to connect from another computer
Permalink
I can view my C5 website from localhost but can't connect to it from another computer on my local network. I have 5-6 more different sites running on the server and I can see all of them, so it's definitely something to do with C5, not the server, firewall or the network. Any clues what it could be?
I tried IP-address/c5/, IP-address/c5/index.php, hostname/c5/, hostname/c5/index.php. I have permissions set to allow everybody (unregistered) to vew the site.
Thank you.
I tried IP-address/c5/, IP-address/c5/index.php, hostname/c5/, hostname/c5/index.php. I have permissions set to allow everybody (unregistered) to vew the site.
Thank you.
What is the error message?
Firefox can't establish connection to server at localhost.
- site can be temp. unavailable or busy...
- site can be temp. unavailable or busy...
... really, c5 has built in protection against XSS that prevents it, in your site.php set it to not rewrite to the baseurl.
If you installed fromhttp://localhost your config/site.php will have:
define('BASE_URL', 'http://localhost');
which will redirect and try to get the data from the save PC you're connecting from.
Simply change that to the PC's name/IP and it should work fine.
You can also try adding the following line to your config/site.php:
define('REDIRECT_TO_BASE_URL', false);
define('BASE_URL', 'http://localhost');
which will redirect and try to get the data from the save PC you're connecting from.
Simply change that to the PC's name/IP and it should work fine.
You can also try adding the following line to your config/site.php:
define('REDIRECT_TO_BASE_URL', false);
Thank you, okhayat, that did the trick. Now I can connect to the site from another computer.
However, I have a small problem - my header picture doesn't show on another computer, I can only see it from localhost. Is there anything else I need to configure? Thank you.
Also, how can I enable pretty URLs? I've got mod_rewrite ON, I've enabled it in Dashboard, I've created an .htaccess file and put it into both /htdocs and /htdocs/C5. What else can I try? I can only view the home page. When I click on any other link it says
"Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404"
However, I have a small problem - my header picture doesn't show on another computer, I can only see it from localhost. Is there anything else I need to configure? Thank you.
Also, how can I enable pretty URLs? I've got mod_rewrite ON, I've enabled it in Dashboard, I've created an .htaccess file and put it into both /htdocs and /htdocs/C5. What else can I try? I can only view the home page. When I click on any other link it says
"Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404"
Just make sure the image path isn't 'statically' referenced to localhost.
View the source, and look at the href path for the img.
View the source, and look at the href path for the img.
It's not, it's part of a theme:
#header { width: 960px; height: 160px; margin: 0 auto; background: url(images/img03.jpg) no-repeat right bottom; }
I can't think of any other problem. Try to right-click on the place where the image is supposed to load, and view background image. Just to see what's wrong.
Oh, I solved this one - I cleared Cache, updated Cache and now it appeared.
About pretty URLs, you just need to place the .htaccess file in your C5 root. If you installed it directly under /htdocs, just place it there. If you added a subdirectory like /htdocs/C5 then place it there ONLY.
Don't put the same file in both places.
Also, make sure mod_rewrite is enabled.
Don't put the same file in both places.
Also, make sure mod_rewrite is enabled.
I meant I've tried it in /htdocs and /htdocs/C5, not both. But neither works. Yes, mod_rewrite is ON:
# a2enmod -l actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 rewrite
Ah, you're using a local Debian/Ubuntu install?
If didn't do this already, you need to AllowOverride All
or anything that permits using .htaccess
If didn't do this already, you need to AllowOverride All
or anything that permits using .htaccess
I'm using openSUSE.
I've changed AllowOverride None to All in /etc/apache2/httpd.conf - but pretty URLs still don't work.
I've changed AllowOverride None to All in /etc/apache2/httpd.conf - but pretty URLs still don't work.
This should help:
http://en.opensuse.org/Apache_Quickstart_HOWTO#Custom_configuration...
http://en.opensuse.org/Apache_Quickstart_HOWTO#Custom_configuration...
Well, I've tried httpd.conf, default-server.conf, sysconfig - no pretty urls. I've also tried adding 'define('URL_REWRITING_ALL',true);' to site.php - it didn't help with urls but all my themes/formatting/css was gone.
And I'm not running a virtual host.
And I'm not running a virtual host.
Did you check /etc/apache2/default-server.conf?
Sorry, I don't have an openSuSe installation to tell you exactly how to change it.
Sorry, I don't have an openSuSe installation to tell you exactly how to change it.
Yes, that too
Sorry, I'm out of solutions ;) Try asking at their IRC channel or send to a mailing list about this.
I'm almost 100% sure it's the issue.
I'm almost 100% sure it's the issue.
Do you have it working on your system? If yes, what system are you running C5 on and what did you do to make it work? Is there anything else to set/enable/change in C5 in addition to simply enabling the pretty urls in the dashboard? that is maybe some page properties or something?
Yes, sure. I'm using Cherokee web server though on Debian and Ubuntu.
Anyway, to configure Apache on these two, I'd enmod rewrite, and do:
sudo vi /etc/apache2/sites-enabled/000-default
Change:
<Directory /var/www/>
AllowOverride None
</Directory>
To:
<Directory /var/www/>
AllowOverride All
</Directory>
and once I restart Apache it works just fine.
Anyway, to configure Apache on these two, I'd enmod rewrite, and do:
sudo vi /etc/apache2/sites-enabled/000-default
Change:
<Directory /var/www/>
AllowOverride None
</Directory>
To:
<Directory /var/www/>
AllowOverride All
</Directory>
and once I restart Apache it works just fine.
Do you know if there's an easy way to check if mod_rewrite itself really works and it's not something else in the CMS? When I go to the pretty urls setup in Joomla, it says mod_rewrite is enabled, I guess it just checks if the Apache module is loaded. But when I click any links it gives me the same page not found error. So it means the .htaccess doesn't override anything or Apache doesn't load it or something. I'll also try the openSUSE forum, maybe someone would know there what to do. Thank you.
Two more things you might try.
If YaST is still available with openSuSE, see if it has anything related to configuring Apache and search for that.
Also, try searching for AllowOverride in your config files:
find /etc -exec grep -H AllowOverride {} \;
This should give you names of any files that has this.
Good luck!
If YaST is still available with openSuSE, see if it has anything related to configuring Apache and search for that.
Also, try searching for AllowOverride in your config files:
find /etc -exec grep -H AllowOverride {} \;
This should give you names of any files that has this.
Good luck!