• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Development on localhost

#1
Hi , to work properly on server , this is my  project root directory:

[Image: 4oXrPhJ.png]



The codeigniter app is inside the codeigniter folder :


[Image: TB3qhCe.png]



The htaccess work fine on server  ( to use link without index.php) but dont work on localhost , how can i use it on localhost without index.php or with spark ?
Reply

#2
In your Config/App.php make sure this is empty.

PHP Code:
public $indexPage ''
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(01-31-2021, 09:44 PM)InsiteFX Wrote: In your Config/App.php make sure this is empty.

PHP Code:
public $indexPage ''

Same problem with public $indexPage = '';
Reply

#4
Then it must be a system configuration issue not sure of what your running.

I also see your running on a Mac, I' am on Windows 10 Pro x64.

I' am sure someone on here can help you.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#5
(02-01-2021, 12:19 PM)InsiteFX Wrote: Then it must be a system configuration issue not sure of what your running.

I also see your running on a Mac, I' am on Windows 10 Pro x64.

I' am sure someone on here can help you.

D0n't offend me  Big Grin im on linux ...







Reply

#6
I wasn't trying to offend you, just stating that I did not know what OS you where running.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#7
@insiteFX i think he was joking !

@pippucio76 are you running Linux (which distro) on bare metal or is it via virtualbox or alternative ?

The way i do Ci4 development on Linux (slackware) is by web apps in their own directories in /var/www/htdocs i.e apache

then use virtualhost config so that a url of http://127.0.0.2 to 127.0.0.9 will in a url bring up landing page of each separate web app. 127.0.0.1 is of course for all intents and purposes "localhost"

( i only bother will secure socket for live)

you seem to have yours in home directory , which is not unusual , but more work to set up - certainly i never have bothered to do that .

i would expect that if your using your home directory then a url to get Co home page up is going to involve that horrible tild then user name i.e

~/username



have you tried directly in apache document root out of interest ?


Also is a page giving summary of web development including Ci for slackware Linux on slackware doc site if your interested
Reply

#8
(02-11-2021, 02:05 PM)captain-sensible Wrote: @insiteFX i think he was joking !

@pippucio76 are you running Linux (which distro) on bare metal or is it via virtualbox or alternative ?

The way i do Ci4 development on Linux (slackware) is by web apps in their own directories in /var/www/htdocs i.e apache

then use virtualhost config so that a url of http://127.0.0.2 to 127.0.0.9 will in a url bring up landing page of each separate web app. 127.0.0.1  is of course for all intents and purposes "localhost"

( i only bother will secure socket for live)

you seem to have yours in home directory , which is not unusual , but more work to set up - certainly i never have bothered to do that .

i would expect that if your using your home directory then a url to get Co home page up is going to involve that horrible tild then user name i.e

~/username



have you tried directly in apache document root out of interest ?


Also  is a page giving summary of web development including Ci for slackware Linux on slackware doc site if your interested

im on xubuntu , i set my localhost as /home/stefano/localhost and work fine .

on ci3 if i go on browser to localhost/myproject it work . i want do same on ci4 but if i dont insert index.php on url doesn't work
Reply

#9
ok,

well on slackware its quite a fiddle getting apache to serve web content from a users directory from a url such as http://127.0.0.1/~andrew


I had to enable LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so in /etc/httpd/httpd.conf and a couple more

then edit /etc/httpd/extra/httpd-userdir.conf etc.

I got that working. I will have a go next at installing CI4 into directory "public_html" which is inside my home directory and no works with apache.

Will be at least a few days. If i can help will reply ...


but before i do that i think there needs to be some clarification.


your original images basically as far as i can see show navigation via something equivalent to Dolphin. I don't see an actual http url , nor how requests are being served or listened to. "localhost" is a bit of a red herring. On linux Ip 127.0.0.1 equates to "localhost".


To my knowledge on Linux these are the choices to develop with CI

1) use php built in server

2) fire up spark

3) use xampp which would be located at /opt

4) server web pages from web root of apache i.e /var/www/htdocs

5) tweak apache to server form linux usert home folder.


which one are you actually using ?

also xubuntu from memory is not cutting edge; from a terminal can you post output of :

Code:
php -v
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.